<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14949] trunk: Move the escaping into get_guid() so we don'
t have to repeat ourselves.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14949">14949</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2010-05-26 17:27:18 +0000 (Wed, 26 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move the escaping into get_guid() so we don't have to repeat ourselves. See <a href="http://trac.wordpress.org/ticket/13555">#13555</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpappphp">trunk/wp-app.php</a></li>
<li><a href="#trunkwpincludesfeedatomcommentsphp">trunk/wp-includes/feed-atom-comments.php</a></li>
<li><a href="#trunkwpincludesfeedatomphp">trunk/wp-includes/feed-atom.php</a></li>
<li><a href="#trunkwpincludesfeedrss2php">trunk/wp-includes/feed-rss2.php</a></li>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpappphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-app.php (14948 => 14949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-app.php        2010-05-26 17:25:57 UTC (rev 14948)
+++ trunk/wp-app.php        2010-05-26 17:27:18 UTC (rev 14949)
</span><span class="lines">@@ -1150,7 +1150,7 @@
</span><span class="cx">         function echo_entry() { ?>
</span><span class="cx"> <entry xmlns="<?php echo $this->ATOM_NS ?>"
</span><span class="cx"> xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>">
</span><del>-        <id><?php esc_url( the_guid( $GLOBALS['post']->ID ) ); ?></id>
</del><ins>+        <id><?php the_guid( $GLOBALS['post']->ID ); ?></id>
</ins><span class="cx"> <?php list($content_type, $content) = prep_atom_text_construct(get_the_title()); ?>
</span><span class="cx">         <title type="<?php echo $content_type ?>"><?php echo $content ?></title>
</span><span class="cx">         <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
</span><span class="lines">@@ -1167,7 +1167,7 @@
</span><span class="cx">         </author>
</span><span class="cx"> <?php if ($GLOBALS['post']->post_type == 'attachment') { ?>
</span><span class="cx">         <link rel="edit-media" href="<?php $this->the_media_url() ?>" />
</span><del>-        <content type="<?php echo $GLOBALS['post']->post_mime_type ?>" src="<?php esc_url( the_guid() ); ?>"/>
</del><ins>+        <content type="<?php echo $GLOBALS['post']->post_mime_type ?>" src="<?php the_guid() ; ?>"/>
</ins><span class="cx"> <?php } else { ?>
</span><span class="cx">         <link href="<?php the_permalink_rss() ?>" />
</span><span class="cx"> <?php if ( strlen( $GLOBALS['post']->post_content ) ) :
</span></span></pre></div>
<a id="trunkwpincludesfeedatomcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed-atom-comments.php (14948 => 14949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom-comments.php        2010-05-26 17:25:57 UTC (rev 14948)
+++ trunk/wp-includes/feed-atom-comments.php        2010-05-26 17:27:18 UTC (rev 14949)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> <?php endif; // post pass
</span><span class="cx">         // Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
</span><span class="cx">         if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
</span><del>-                <thr:in-reply-to ref="<?php esc_url( the_guid() ); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
</del><ins>+                <thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
</ins><span class="cx"> <?php else : // This comment is in reply to another comment
</span><span class="cx">         $parent_comment = get_comment($comment->comment_parent);
</span><span class="cx">         // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system
</span></span></pre></div>
<a id="trunkwpincludesfeedatomphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed-atom.php (14948 => 14949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom.php        2010-05-26 17:25:57 UTC (rev 14948)
+++ trunk/wp-includes/feed-atom.php        2010-05-26 17:27:18 UTC (rev 14949)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">                 </author>
</span><span class="cx">                 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
</span><span class="cx">                 <link rel="alternate" type="text/html" href="<?php the_permalink_rss() ?>" />
</span><del>-                <id><?php esc_url( the_guid() ); ?></id>
</del><ins>+                <id><?php the_guid() ; ?></id>
</ins><span class="cx">                 <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
</span><span class="cx">                 <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
</span><span class="cx">                 <?php the_category_rss('atom') ?>
</span></span></pre></div>
<a id="trunkwpincludesfeedrss2php"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed-rss2.php (14948 => 14949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-rss2.php        2010-05-26 17:25:57 UTC (rev 14948)
+++ trunk/wp-includes/feed-rss2.php        2010-05-26 17:27:18 UTC (rev 14949)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 <dc:creator><?php the_author() ?></dc:creator>
</span><span class="cx">                 <?php the_category_rss() ?>
</span><span class="cx">
</span><del>-                <guid isPermaLink="false"><?php esc_url( the_guid() ); ?></guid>
</del><ins>+                <guid isPermaLink="false"><?php the_guid(); ?></guid>
</ins><span class="cx"> <?php if (get_option('rss_use_excerpt')) : ?>
</span><span class="cx">                 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
</span><span class="cx"> <?php else : ?>
</span></span></pre></div>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (14948 => 14949)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2010-05-26 17:25:57 UTC (rev 14948)
+++ trunk/wp-includes/post-template.php        2010-05-26 17:27:18 UTC (rev 14949)
</span><span class="lines">@@ -127,13 +127,15 @@
</span><span class="cx"> * The guid will appear to be a link, but should not be used as an link to the
</span><span class="cx"> * post. The reason you should not use it as a link, is because of moving the
</span><span class="cx"> * blog across domains.
</span><ins>+ *
+ * Url is escaped to make it xml safe
</ins><span class="cx"> *
</span><span class="cx"> * @since 1.5.0
</span><span class="cx"> *
</span><span class="cx"> * @param int $id Optional. Post ID.
</span><span class="cx"> */
</span><span class="cx"> function the_guid( $id = 0 ) {
</span><del>-        echo get_the_guid($id);
</del><ins>+        echo esc_url( get_the_guid($id) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>
</body>
</html>