Page 1 of 1

JS error and no map displayed with special characters

Posted: 03 Mar 2016, 13:23
by smartin
Hello,

I've migrated a client Joomla site to J3, updating Phoca maps too to latest version.

I've got JS error:
SyntaxError: missing } after property list

with:
var infoPhocaWindow2PlgPM1 = new google.maps.InfoWindow({
content: '<div style="font-size:120%;margin: 5px 0px;font-weight:bold;">ITEP L\'Oratoire - Liste</div><div><p>ITEP L'Oratoire</p></div>'
});

French language is used here and ' character seems to be the issue. It should be protected with \ (everywhere...).

By comparaison with the J.25 phoca maps version, this point was managed correctly:

var infoPhocaWindow2PlgPM1 = new google.maps.InfoWindow({
content: '<div style="font-size:120%;margin: 5px 0px;font-weight:bold;">ITEP L\'Oratoire - Liste</div><div><p>ITEP L\'Oratoire</p></div>'
});

Can you help me to fix this ?

Thank you for your support,

Stephane

Re: JS error and no map displayed with special characters

Posted: 05 Mar 2016, 19:11
by Jan
Hi, which version do you exactly use?, I suppose, this is the text of marker description?

I am testing it now with ' and get no problem, see:
Image

When I see your code, in both (J 2.5, J 3.5) is the ' normally escaped :idea:

Is there no other javascript error on the page?

Jan