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: https://core.trac.wordpress.org/ticket/31080/

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!

You may also like...

Leave a Reply

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

%d bloggers like this: