<!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>[14947] trunk:
  Escape the guid urls when placing them in feeds and other xml locations.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14947">14947</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2010-05-26 17:01:21 +0000 (Wed, 26 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Escape the guid urls when placing them in feeds and other xml locations. See <a href="http://trac.wordpress.org/ticket/13555">#13555</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesexportphp">trunk/wp-admin/includes/export.php</a></li>
<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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesexportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/export.php (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/export.php        2010-05-26 16:32:36 UTC (rev 14946)
+++ trunk/wp-admin/includes/export.php        2010-05-26 17:01:21 UTC (rev 14947)
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx">                 &lt;dc:creator&gt;&lt;?php echo wxr_cdata( get_the_author() ); ?&gt;&lt;/dc:creator&gt;
</span><span class="cx">                 &lt;?php wxr_post_taxonomy() ?&gt;
</span><span class="cx"> 
</span><del>-                &lt;guid isPermaLink=&quot;false&quot;&gt;&lt;?php the_guid(); ?&gt;&lt;/guid&gt;
</del><ins>+                &lt;guid isPermaLink=&quot;false&quot;&gt;&lt;?php esc_url( the_guid() ); ?&gt;&lt;/guid&gt;
</ins><span class="cx">                 &lt;description&gt;&lt;/description&gt;
</span><span class="cx">                 &lt;content:encoded&gt;&lt;?php echo wxr_cdata( apply_filters( 'the_content_export', $post-&gt;post_content ) ); ?&gt;&lt;/content:encoded&gt;
</span><span class="cx">                 &lt;excerpt:encoded&gt;&lt;?php echo wxr_cdata( apply_filters( 'the_excerpt_export', $post-&gt;post_excerpt ) ); ?&gt;&lt;/excerpt:encoded&gt;
</span></span></pre></div>
<a id="trunkwpappphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-app.php (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-app.php        2010-05-26 16:32:36 UTC (rev 14946)
+++ trunk/wp-app.php        2010-05-26 17:01:21 UTC (rev 14947)
</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 the_guid($GLOBALS['post']-&gt;ID); ?&gt;&lt;/id&gt;
</del><ins>+        &lt;id&gt;&lt;?php esc_url( 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 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 esc_url( 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 (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom-comments.php        2010-05-26 16:32:36 UTC (rev 14946)
+++ trunk/wp-includes/feed-atom-comments.php        2010-05-26 17:01:21 UTC (rev 14947)
</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 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 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;
</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 (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom.php        2010-05-26 16:32:36 UTC (rev 14946)
+++ trunk/wp-includes/feed-atom.php        2010-05-26 17:01:21 UTC (rev 14947)
</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 the_guid(); ?&gt;&lt;/id&gt;
</del><ins>+                &lt;id&gt;&lt;?php esc_url( 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 (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-rss2.php        2010-05-26 16:32:36 UTC (rev 14946)
+++ trunk/wp-includes/feed-rss2.php        2010-05-26 17:01:21 UTC (rev 14947)
</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 the_guid(); ?&gt;&lt;/guid&gt;
</del><ins>+                &lt;guid isPermaLink=&quot;false&quot;&gt;&lt;?php esc_url( 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>
</div>

</body>
</html>