WordPress version: 3.5.1
WordPress SEO version: 1.4.7
I did this: got an xml parsing error from Google Webmaster Tools
I expected the plugin to do this: output valid xml 🙂
Instead it did this: applied quick fix
I recently found out from Google Webmaster Tools that some of my sitemaps where not being indexed because of a xml parsing error.
The problem was that some of my URLs had ampersands that weren’t encoded, so taking a look at the plugin I tried a quick fix. On class-sitemaps.php, find the sitemap_url method and just before defining the $output, add:
$url['loc'] = htmlspecialchars( $url['loc'] );
This complies with the Sitemap protocol as defined on http://www.sitemaps.org/protocol.html#escaping
Hope you can add it to the plugin to solve this for others that might have the same issue.
- The topic ‘URL Encoding on sitemaps’ is closed to new replies.