Opened 14 years ago
Closed 12 years ago
#15549 closed defect (bug) (duplicate)
WordPress fails to ping whole url if there's an ampersand
Reported by: | unpix | Owned by: | markjaquith |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Pings/Trackbacks | Keywords: | |
Focuses: | Cc: |
Description
I have a custom blog and I noticed a problem with pingbacks from Wordpress blogs. When writing a post in Wordpress, it encodes the "&" properly to
&
html entity.
However, when it tries to ping the url, it uses the url where the ampersands are encoded as html entities. This causes Wordpress to strip out every GET variable after the first one, for example:
URL should be: http://example.com/index.php?a=b&c=d but it is http://example.com/index.php?a=b&
So Wordpress misses everything after the first variable in the url and fails to ping the right url.
I can see this from my server logs.
Attachments (1)
Change History (6)
#1
@
14 years ago
- Milestone changed from Awaiting Review to Future Release
- Owner set to markjaquith
- Status changed from new to accepted
#2
@
14 years ago
- Summary changed from Wordpress fails to ping whole url if there's an ampersand to WordPress fails to ping whole url if there's an ampersand
#4
@
12 years ago
- Keywords has-patch added; needs-patch removed
The regex used to extract URLs for pinging is old and odd - I updated it to use this one, which I tend to prefer: http://daringfireball.net/2010/07/improved_regex_for_matching_urls
I also moved it into a function so the regex isn't duped across functions. Patch attached.
To be clear, this is a Pingback issue.