<!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() { ?&gt;
</span><span class="cx"> &lt;entry xmlns=&quot;&lt;?php echo $this-&gt;ATOM_NS ?&gt;&quot;
</span><span class="cx">        xmlns:app=&quot;&lt;?php echo $this-&gt;ATOMPUB_NS ?&gt;&quot; xml:lang=&quot;&lt;?php echo get_option('rss_language'); ?&gt;&quot;&gt;
</span><del>-        &lt;id&gt;&lt;?php esc_url( the_guid( $GLOBALS['post']-&gt;ID ) ); ?&gt;&lt;/id&gt;
</del><ins>+        &lt;id&gt;&lt;?php the_guid( $GLOBALS['post']-&gt;ID ); ?&gt;&lt;/id&gt;
</ins><span class="cx"> &lt;?php list($content_type, $content) = prep_atom_text_construct(get_the_title()); ?&gt;
</span><span class="cx">         &lt;title type=&quot;&lt;?php echo $content_type ?&gt;&quot;&gt;&lt;?php echo $content ?&gt;&lt;/title&gt;
</span><span class="cx">         &lt;updated&gt;&lt;?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?&gt;&lt;/updated&gt;
</span><span class="lines">@@ -1167,7 +1167,7 @@
</span><span class="cx">         &lt;/author&gt;
</span><span class="cx"> &lt;?php if ($GLOBALS['post']-&gt;post_type == 'attachment') { ?&gt;
</span><span class="cx">         &lt;link rel=&quot;edit-media&quot; href=&quot;&lt;?php $this-&gt;the_media_url() ?&gt;&quot; /&gt;
</span><del>-        &lt;content type=&quot;&lt;?php echo $GLOBALS['post']-&gt;post_mime_type ?&gt;&quot; src=&quot;&lt;?php esc_url( the_guid() ); ?&gt;&quot;/&gt;
</del><ins>+        &lt;content type=&quot;&lt;?php echo $GLOBALS['post']-&gt;post_mime_type ?&gt;&quot; src=&quot;&lt;?php the_guid() ; ?&gt;&quot;/&gt;
</ins><span class="cx"> &lt;?php } else { ?&gt;
</span><span class="cx">         &lt;link href=&quot;&lt;?php the_permalink_rss() ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;?php if ( strlen( $GLOBALS['post']-&gt;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"> &lt;?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-&gt;comment_parent == 0 ) : // This comment is top level ?&gt;
</span><del>-                &lt;thr:in-reply-to ref=&quot;&lt;?php esc_url( the_guid() ); ?&gt;&quot; href=&quot;&lt;?php the_permalink_rss() ?&gt;&quot; type=&quot;&lt;?php bloginfo_rss('html_type'); ?&gt;&quot; /&gt;
</del><ins>+                &lt;thr:in-reply-to ref=&quot;&lt;?php the_guid(); ?&gt;&quot; href=&quot;&lt;?php the_permalink_rss() ?&gt;&quot; type=&quot;&lt;?php bloginfo_rss('html_type'); ?&gt;&quot; /&gt;
</ins><span class="cx"> &lt;?php else : // This comment is in reply to another comment
</span><span class="cx">         $parent_comment = get_comment($comment-&gt;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">                 &lt;/author&gt;
</span><span class="cx">                 &lt;title type=&quot;&lt;?php html_type_rss(); ?&gt;&quot;&gt;&lt;![CDATA[&lt;?php the_title_rss() ?&gt;]]&gt;&lt;/title&gt;
</span><span class="cx">                 &lt;link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;&lt;?php the_permalink_rss() ?&gt;&quot; /&gt;
</span><del>-                &lt;id&gt;&lt;?php esc_url( the_guid() ); ?&gt;&lt;/id&gt;
</del><ins>+                &lt;id&gt;&lt;?php the_guid() ; ?&gt;&lt;/id&gt;
</ins><span class="cx">                 &lt;updated&gt;&lt;?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?&gt;&lt;/updated&gt;
</span><span class="cx">                 &lt;published&gt;&lt;?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?&gt;&lt;/published&gt;
</span><span class="cx">                 &lt;?php the_category_rss('atom') ?&gt;
</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">                 &lt;dc:creator&gt;&lt;?php the_author() ?&gt;&lt;/dc:creator&gt;
</span><span class="cx">                 &lt;?php the_category_rss() ?&gt;
</span><span class="cx"> 
</span><del>-                &lt;guid isPermaLink=&quot;false&quot;&gt;&lt;?php esc_url( the_guid() ); ?&gt;&lt;/guid&gt;
</del><ins>+                &lt;guid isPermaLink=&quot;false&quot;&gt;&lt;?php the_guid(); ?&gt;&lt;/guid&gt;
</ins><span class="cx"> &lt;?php if (get_option('rss_use_excerpt')) : ?&gt;
</span><span class="cx">                 &lt;description&gt;&lt;![CDATA[&lt;?php the_excerpt_rss() ?&gt;]]&gt;&lt;/description&gt;
</span><span class="cx"> &lt;?php else : ?&gt;
</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>