Support » Plugin: Basic Google Maps Placemarks » Seeing HTML entity code in title when using a hyphen

  • I’m not quite sure when this started happening, but I’m seeing the HTML entity code for the hyphen character when used in the placemark title when it is between whitespace characters. For example:

    DevConnections Spring 2012 – March 26-29, 2012
    displays as
    DevConnections Spring 2012 &%8211; March 26-29, 2012

    However, if I change the title to this:

    DevConnections Spring 2012-March 26-29, 2012

    It displays properly.

    You can see the issue here:

    SQL Server Events

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ian Dunn


    A few people were having that problem during the RC stage for 1.10, but I couldn’t reproduce the problem locally.

    I’m pretty busy right now, but I’ll try to take another shot at reproducing it. If you notice any other details that might help troubleshoot it, please let me know.


    You can see the problem when you hover on a marker on the google map.

    The problem is that you put html entities in the javascript variable.

    When the $placemark is created (in core.php) you call apply_filter(‘the_title’) and apply_filter(‘the_content’) to set title and details.

    These 2 filters transform special characters into html entities (by the wptexturize function which is systematically added in wp-includes/default-filters.php)

    What is the purpose of these filters when you create your placemarks ?

    Plugin Author Ian Dunn


    Yeah, it’s probably related to that, but I could never get it to happen on my local install, even when I put HTML entities, Unicode characters, and anything else I could think of in my test posts. I tried copying exactly what the reporters had, but still couldn’t get it to happen, so I think there may be some other factors involved.

    The purpose of passing the content through those filters is so that it will display exactly the same as it would inside a post. For example, if someone wants to put a shortcode inside the placemark details. It’s also a way of escaping the content for security.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Seeing HTML entity code in title when using a hyphen’ is closed to new replies.