Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6218 closed defect (bug) (invalid)

Wordpress modifies URL data in href's

Reported by: hexley Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


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 & (ampersand) gets url encoded, as seen here:

<a href="http://example.com/lists/?p=subscribe&#038;id=1">
should be:
<a href="http://example.com/lists/?p=subscribe&id=1">
This of course pisses of a html validator.

I think this is also wrong:
<a href="http://example.com/wp-admin/post.php?action=edit&amp;post=119" title="Edit post">Edit This</a>

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 & on the page, not in a url that will end up in a browser.

It is now making a lot of sense why some urls emailed to others are failing on OS X mail.app

Change History (2)

#1 @lloydbudd
14 years ago

  • Milestone 2.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

#2 @hexley
14 years ago

Yeah, sorry, I am an idiot, after reading that page more carefully, I realize they do in fact want it encoded in the href.

Note: See TracTickets for help on using tickets.