Forum: Bug Reports

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Not resolved]Bug: Escaping of special characters in location being output

Forums Bug Reports Bug: Escaping of special characters in location being output

Viewing 1 post (of 1 total)
  • Author
  • #51214

    Using Type an address to autocomplete I enter an address in (e.g.) Bishops’s Stortford. Even if I don’t input the ' then the autocomplete results do it for me. The returned value is escaped, and on every save / update is is escaped again leading to increasing slashes…
    The only way around this seems to be to manually edit the Enter Address Manually -> Address field afterwards to remove the character and escaping slash. While this solution works practically it isn’t friendly to non-technical users particularly.

    The value, including the escaping slashes, is being saved in the (wp)_places_locator table in the city, address and formatted_address fields in my testing. It may well effect all data saved to this table. I’m not sure if this is fixed in the beta already – I haven’t tried, but I believe you must be escaping the value before saving to the database instead of sanitizing. Without looking at your code I guess you could use $wpdb->insert/update (which takes unescaped data) to save the value, then run it through esc_html when you return the value.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.