Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#15549 closed defect (bug) (duplicate)

WordPress fails to ping whole url if there's an ampersand

Reported by: unpix's profile unpix Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Pings/Trackbacks Keywords:
Focuses: Cc:


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:

but it is

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)

new-ping-urls-regex.diff (4.3 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @markjaquith
13 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to markjaquith
  • Status changed from new to accepted

#2 @PeteMall
13 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

#3 @markjaquith
13 years ago

  • Keywords needs-patch added; pingback url &amp ampersand removed

To be clear, this is a Pingback issue.

#4 @wonderboymusic
11 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:

I also moved it into a function so the regex isn't duped across functions. Patch attached.

#5 @wonderboymusic
11 years ago

  • Keywords has-patch removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from accepted to closed

Duplicate of #9064.

Note: See TracTickets for help on using tickets.