WordPress.org

Ready to get started?Download WordPress

Forums

Basic Google Maps Placemarks
Seeing HTML entity code in title when using a hyphen (4 posts)

  1. vickyharp
    Member
    Posted 1 year ago #

    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:

    http://vickyharp.com/sql-server-events/

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

  2. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. FranceImage
    Member
    Posted 1 year ago #

    Hello,

    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 ?

  4. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.