Support » Plugin: Basic Google Maps Placemarks » [Plugin: Basic Google Maps Placemarks] Line breaks added to description popup

  • Resolved chodorowicz

    (@chodorowicz)


    I have strange problem – I’ve added list items to my description popup. The problem is that they are outputted with <br> tags between <li>. When I enter the HTML edit mode and put everyting in one line of code like <ul><li>text... then the output is OK.

    Do you have any idea what might be the problem?

    Btw. I’m blown away by this plugin – the best Google Maps integration plugin out there!

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

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

    (@iandunn)

    The plugin passes the description through PHP’s nl2br() function, which is probably what’s causing that. I don’t remember exactly why I put that in there, but I think it was because paragraph breaks were stripped without it. There’s probably a better way to do it, though, so I’ll look into fixing it in a future release.

    In the mean time, you can make a simple change to the code to fix it:

    For the [bgmp-map] shortcode, edit the getPlacemarks() method. In version 1.5.1, change line 629 from

    'details' => nl2br( $pp->post_content ),
    to
    'details' => $pp->post_content,

    For the [bgmp-list] shortcode, edit the listShortcode() method. In version 1.5.1, change line 555 from

    nl2br( $p->post_content ),
    to
    $p->post_content,

    Thanks a lot Ian for help. I’ll be also checking out your blog, looks interesting! Greets

    Plugin Author Ian Dunn

    (@iandunn)

    Version 1.6 uses wpautop() instead of nl2br(), which fixes this.

    Great, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Basic Google Maps Placemarks] Line breaks added to description popup’ is closed to new replies.