WordPress Trac: Ticket #6218: Wordpress modifies URL data in href'shttps://core.trac.wordpress.org/ticket/6218
<p>
Data inside an href is changed, and I do not think under any case should a user entered url be changed unless outside an href. Currently the &amp; (ampersand) gets url encoded, as seen here:
</p>
<p>
&lt;a href="<a class="ext-link" href="http://example.com/lists/?p=subscribe&amp;#038;id=1"><span class="icon">​</span>http://example.com/lists/?p=subscribe&amp;#038;id=1</a>"&gt;
should be:
&lt;a href="<a class="ext-link" href="http://example.com/lists/?p=subscribe&amp;id=1"><span class="icon">​</span>http://example.com/lists/?p=subscribe&amp;id=1</a>"&gt;
This of course pisses of a html validator.
</p>
<p>
I think this is also wrong:
&lt;a href="<a class="ext-link" href="http://example.com/wp-admin/post.php?action=edit&amp;amp;post=119"><span class="icon">​</span>http://example.com/wp-admin/post.php?action=edit&amp;amp;post=119</a>" title="Edit post"&gt;Edit This&lt;/a&gt;
</p>
<p>
As you can see, URL encode on the ampersand again. While a browser recovers from this, the W3C expressly states you should only do this when you want to show an &amp; on the page, not in a url that will end up in a browser.
</p>
<p>
It is now making a lot of sense why some urls emailed to others are failing on OS X mail.app
</p>
en-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/ticket/6218
Trac 1.0.1lloydbuddFri, 14 Mar 2008 15:28:47 GMTstatus changed; resolution set; milestone deletedhttps://core.trac.wordpress.org/ticket/6218#comment:1
https://core.trac.wordpress.org/ticket/6218#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>invalid</em>
</li>
<li><strong>milestone</strong>
<em>2.6</em> deleted
</li>
</ul>
<p>
I believe you are mistaken. <a class="ext-link" href="http://www.htmlhelp.com/tools/validator/problems.html#amp"><span class="icon">​</span>http://www.htmlhelp.com/tools/validator/problems.html#amp</a>
</p>
TickethexleySat, 15 Mar 2008 01:56:39 GMThttps://core.trac.wordpress.org/ticket/6218#comment:2
https://core.trac.wordpress.org/ticket/6218#comment:2
<p>
Yeah, sorry, I am an idiot, after reading that page more carefully, I realize they do in fact want it encoded in the href.
</p>
Ticket