Skip Navigation

[Resolved] Square brackets output as ASCII (HTML) equivalents in loop

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by JoelK2744 6 years ago.

Assisted by: Shane.

Author
Posts
#1163102

I am trying to: Get a map to display multiple markers using leaflet

Link to a page where the issue can be seen: hidden link

I expected to see: multiple markers on a map

Instead, I got: just a map

Hello, I previously had a support ticket open ( https://toolset.com/forums/topic/output-address-coordinates-from-filtered-view/#post-956489 ) about this which had resolved itself but now the issue has returned. Our site has just been updated to WordPress 5.0 and since then it hasn't worked.

I've used this leaflet map plugin ( https://wordpress.org/plugins/leaflet-map/ ) for the maps, it uses a map shortcode for the actual map (which works fine because it's placed before the loop starts) and a marker shortcode for the marker/s within the loop, the problem is that the loop output then breaks the code in the leaflet marker script that is loaded - it replaces "[" with "&#091*semi-colon*" and "]" with "&#093*semi-colon*" ( replaced ; with *semi-colon* as just displays bracket otherwise!)

If you use inspector on the page I linked to at the top, you can see the map script loads fine without breaking, but the marker script within the loop breaks (see the errors). The same marker shortcode works fine if it's outside the loop so it seems to be something to do with the Toolset view loop.

Any thoughts about why this is happening or how I can prevent it so the brackets stay as brackets when the map script loads. In my previous ticket Christian thought a text string replacement might work but I wouldn't know where to start with this.

Thanks

#1163139

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Once you have the information for me you can post it here.

Thanks,
Shane

#1169455

My issue is resolved now. Thank you!