Change Escaping Methods for GUIDs in WordPress Feeds

WordPress 4.2 will introduce a new filter, the_guid, which will allow developers to alter the escaping method for the GUID value present in RSS feeds. This addresses a problem with migrated content containing non-URL GUIDs being escaped via WordPress Core‘s native esc_url method.

Here is an example where we change the escaping method from esc_url to esc_html:


Read More:

If you are really bold, you can test out the new esc_xml() method found in this GitHub project which takes advantage of this hook. Contributors are always welcome!

Steven Word

Steven is a software developer working out of San Francisco with a focus on contributing open source solutions for the WordPress publishing platform. When he's not swearing at bugs or celebrating a successful product launch, he enjoys spicy food, Toyota sports cars, trip-hop, and beer snobbery.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *