dynmap icon indicating copy to clipboard operation
dynmap copied to clipboard

HTML entities being encoded

Open phaed-one opened this issue 14 years ago • 5 comments

I am setting the flags to true

Marker m = markers.remove(tag);

if (m == null)
{
    m = markerSet.createMarker(tag, label, world.getName(), loc.getX(), loc.getY(), loc.getZ(), icon, true);
    DynmapSimpleClansPlugin.info("Marker added for " + tag);
}
else
{
    m.setLocation(world.getName(), loc.getX(), loc.getY(), loc.getZ());
    m.setLabel(label, true);
    m.setMarkerIcon(icon);
}

newMarkers.put(tag, m);

Yet this is what I see: http://sacredlabyrinth.net/temp/screenshot138.png

What am I doing wrong?

phaed-one avatar Feb 09 '12 06:02 phaed-one

What is the specific string you are setting for 'label'? Also, you need to use the other 'createMarker' method (the one with the boolean 'markup' as the third parameter, set to true). The one you're using is the legacy one, before the label could contain markup (so it defaults to 'false').

mikeprimm avatar Feb 09 '12 18:02 mikeprimm

I see, I assumed it was that last value on the legacy one. Didn't notice the second. Thanks.

phaed-one avatar Feb 09 '12 18:02 phaed-one

The other thing to consider is not using 'persistent' markers, by default (last parameter). For a mod that has its own definition of the thing being presented, this creates a second persistent thing that will be left behind if the mod is removed, its configuration is edited offline, or whatever - for most of the integrations I've done, we just reflect the entities from the mod at each startup (potientially recreating the same thing as last time, but simplifying the problem of 'orphan' persistent markers that may otherwise linger indefinitely).

mikeprimm avatar Feb 09 '12 22:02 mikeprimm

Works perfectly, thank you.

phaed-one avatar Feb 09 '12 23:02 phaed-one

Excelent :)

mikeprimm avatar Feb 09 '12 23:02 mikeprimm