Fix emoji handling (again)
This commit is contained in:
parent
4d2652c996
commit
7d7b2e2e6e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.21.5",
|
||||
"version": "2.21.6",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"@turf/bezier-spline": "~6.5.0",
|
||||
|
@ -1783,8 +1783,9 @@ function setMarker(data) {
|
||||
opts.size = opts.size || sz;
|
||||
opts.size = opts.size * (opts.scale || 1);
|
||||
// escape out any isocodes eg flag symbols
|
||||
var optfields = ["additionalInformation","higherFormation","specialHeadquarters","staffComments","type","uniqueDesignation","speed"];
|
||||
const regex = /\p{Extended_Pictographic}/ug;
|
||||
var optfields = ["additionalInformation","higherFormation","specialHeadquarters","staffComments","type","uniqueDesignation","speed","country"];
|
||||
//const regex = /\p{Extended_Pictographic}/ug;
|
||||
const regex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/gi;
|
||||
optfields.forEach(function (item) {
|
||||
if (opts.hasOwnProperty(item) && regex.test(opts[item])) {
|
||||
opts[item] = unescape(encodeURIComponent(opts[item]));
|
||||
|
Loading…
Reference in New Issue
Block a user