Opened 5 years ago
Closed 5 years ago
#7844 closed defect (bug) (fixed)
WP sends url-encoded text in pingback/trackback
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7 |
| Component: | General | Version: | 2.7 |
| Severity: | major | Keywords: | has-patch |
| Cc: |
Description
From [9012], WP sends trackback/pingback using urlencoded text.
[9012] introduces HTTP api to send trackback/pingback. But in this changeset, WP sends blog-title, uri and excerpt in url-encoded format.
So pinged/trackbacked blog displays some strangely formatted trackback like,
blog+title // title http%3A%2F%2Fexample.org%2F111 // uri blah+blah+blah+%23%21%40%23%24 // excerpt
This behavior is caused by passing arguments of HTTP api in urlencoded text. (wp-includes/comment.php:1312)
To fix this problem, I've patched current working version of trunk like following diff.
--- comment.php (revision 9098) +++ comment.php (working copy) @@ -1310,10 +1310,10 @@ $options = array(); $options['timeout'] = 4; $options['body'] = array( - 'title' => urlencode($title), - 'url' => urlencode(get_permalink($ID)), - 'blog_name' => urlencode(get_option('blogname')), - 'excerpt' => urlencode($excerpt) + 'title' => $title, + 'url' => get_permalink($ID), + 'blog_name' => get_option('blogname'), + 'excerpt' => $excerpt );
Attachments (1)
Change History (6)
- Summary changed from WP sends urlencode text in pingback/trackback to WP sends url-encoded text in pingback/trackback
WP_Http::request() calls http_build_query() to encode the request so your patch looks correct.
Note: See
TracTickets for help on using
tickets.

Patch for wp-includes/comments.php