• majick777

    (@majick777)


    I’ve been working on a plugin that works with pingbacks, and there seems to be a problem with the line in class-wp-xmlrpc-server.php which uses strip_tags.

    (line 3422 in WP 3.1):
    $linea = strip_tags( $linea, '<a>' ); // just keep the tag we need

    For some reason this function is not working properly at all on some templates (or that is the way it seems) and instead of returning all the <a> tags is cutting a lot of them out, making it seem to the server like there is no target link in the source URI, and thus returning a pingback fault 17 unnecessarily. And this means a large percentage of genuine pingbacks are failing without the user even knowing about it!

    I have included a workaround in my new plugin:
    http://wordpress.org/extend/plugins/pingchecker/
    Basically it does a regex match for links in your content, then echoes them in a hidden div in the footer, making it much easier for the strip_tags function to actually find them.

    But this line really needs to be replaced with the regex match in the actual server code for future WordPress users too. I don’t know regex myself, but I used sample code I found here (http://regexadvice.com/forums/thread/48395.aspx) for this regex expression, which seems to work really well.

    Hopefully this finds its way to the right person able to fix this. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pingback bug located in xml-rpc-server’ is closed to new replies.