Title: Plugin Strips Marker HTML
Last modified: February 9, 2026

---

# Plugin Strips Marker HTML

 *  Resolved [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 4 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/)
 * Hi,
 * We’ve noticed that your plugin, when activated, strips the HTML from markers?
   For example, this marker which should be rendered with an image and link …
 *     ```wp-block-code
                               marker.bindPopup(window.WPLeafletMapPlugin.unescape('<a href=\"https://scallop.org.uk/the-denbigh/\" title=\"The Denbigh\"> <img loading=\"lazy\" src=\"https://scallop.org.uk/wp-content/uploads/2025/02/p89-150x150.png\" alt=\"The Denbigh\" title=\"The Denbigh\"><br />The Denbigh</a>'));
       ```
   
 * Is instead rendered like this with all HTML tags stripped?
 *     ```wp-block-code
       <div class="leaflet-popup-content" style="width: 71px;"> The Denbigh</div>
       ```
   
 * Please advise.
 * Thank you.
 * Oliver
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-strips-marker-html%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18815837)
 * I cannot confirm that. There must be another cause. Maybe the reason is, that
   the marker “Georgie Porgie” has an incorrect latitude and longitude.
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18816419)
 * Ah, good catch, however removing that marker doesn’t resolve the issue. I have
   disabled your plugin so you can see how the marker content is meant to look …?
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18816848)
 * The scripts for clustering markers I changed 2 years ago. New in last version
   is the script for fullscreen. Can you enable the Extension plugin again and test
   the page with and without `cluster` and `fullscreen`?
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18816970)
 * I’ve re-enabled the plugin and disabled both cluster and fullscreen shortcodes
   and the issue persists. So this _is_ odd!
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18817163)
 * Searched and [found](https://github.com/hupe13/extensions-leaflet-map-github/blob/dd4b32ed447bb6664eed9d5cbbd43f2b60a42a4e/php/enqueue-leafletplugins.php#L564).
   What is your editor in backend?
 * [Changelog](https://github.com/hupe13/extensions-leaflet-map-github/blob/main/CHANGELOG.md#34--230304)
    -  This reply was modified 3 months, 3 weeks ago by [hupe13](https://wordpress.org/support/users/hupe13/).
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18817593)
 * Yeah, we use the Shortcode block to inject our markers dynamically. But surely
   this would only decode HTML entities not stripe HTML tags?
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18818730)
 * The render_block filter is the only place where something is done without using
   any shortcode from the Extension plugin (and the gesture handling, of course).
 * How do you “inject our markers dynamically”? If I create marker dynamically I
   use a php script with `do_shortcode('[leaflet-marker ... ]... [/leaflet-marker]');`.
 * Or can you comment out the render_block for testing and try again?
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18819085)
 * I can confirm that commenting out the `render_block` filter resolves the issue!
 * I can also confirm that we also use `do_shortcode()` (within our own shortcode)
   to render the markers dynamically …
 *     ```wp-block-code
       $lat = filter_var(get_post_meta($post->ID, 'geo_latitude', true), FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);$lng = filter_var(get_post_meta($post->ID, 'geo_longitude', true), FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);if ($lat && $lng) {    $content .= do_shortcode('[leaflet-marker svg lat=' . esc_attr($lat) . ' lng=' . esc_attr($lng) . ' iconClass="dashicons-svg dashicons-svg-' . esc_attr(sanitize_key($marker_icon['iconClass'])) . '"]' . $marker_content . '[/leaflet-marker]');}
       ```
   
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18820241)
 * <del>I think, the easiest way will be to create a switch in next version.</del
   >
 * I’ll delete it, I’ve tested it, it’s no longer needed. See in /wp-includes/js/
   dist/block-library.js, search “core/shortcode”. There is written `"source":"raw"`.
    -  This reply was modified 3 months, 3 weeks ago by [hupe13](https://wordpress.org/support/users/hupe13/).
    -  This reply was modified 3 months, 3 weeks ago by [hupe13](https://wordpress.org/support/users/hupe13/).
    -  This reply was modified 3 months, 3 weeks ago by [hupe13](https://wordpress.org/support/users/hupe13/).
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18820638)
 * I was going to suggest setting the filter callback as a named function rather
   than an anonymous one so that it could be removed with `remove_filter()` but 
   if it’s not needed at all and you’re going to remove it, that works too 🙂
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18830456)
 * It is solved in version 4.12.

Viewing 11 replies - 1 through 11 (of 11 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-strips-marker-html%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/extensions-leaflet-map/assets/icon-256x256.png?rev=3067862)
 * [Extensions for Leaflet Map](https://wordpress.org/plugins/extensions-leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/extensions-leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/extensions-leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/extensions-leaflet-map/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [hupe13](https://wordpress.org/support/users/hupe13/)
 * Last activity: [3 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-strips-marker-html/#post-18830456)
 * Status: resolved