Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

felipelavinz on "[Plugin: WordPress SEO by Yoast] URL Encoding on sitemaps"

$
0
0

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

---

Hi

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.

http://wordpress.org/extend/plugins/wordpress-seo/


Viewing all articles
Browse latest Browse all 42467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>