[wp-hackers] wp_insert_link() --> rss output

Russ Gilman-Hunt gilmanhunt at comcast.net
Thu Oct 11 00:57:13 GMT 2007

Good evening.

First, I'm happy to write a patch for this, I just want to know where I
should patch it and keep most consistent with wp development.

I'm working with feedwordpress, and I'm getting bad urls imported. It
calls wp_insert_link() for 2.0+ versions of wordpress.  The urls have
unescaped ampersands (foo.php?bar=blah&baz=blah ). 

Looking up the function wp_insert_link, it doesn't do any "fixoring" of
the url it accepts.  wp_insert_link is called by some import scripts and
by the bookmark.php script.

I'm pretty sure that "urls are supposed to have the ampersand escaped,"
but that almost all browsers will accept them unescaped (by escaped, I
mean replaced with &, not really escaped ).  However, it's leading
to breakage with RSS readers; feedburner won't take one of my feeds
because of the ampersands (actually because &baz does not end with a
semicolon, but that's the problem). 

So I have three choices;

1) I can send the author of feedwordpress a patch to escape ampersands. 

2) I can submit a patch to wp-admin/includes/bookmark.php (where this
function is defined).

3) I can submit a patch to the feed scripts ( wp-includes/feed.php )

Which one would be the best to do this?

More information about the wp-hackers mailing list