JS error and no map displayed with special characters

Phoca Maps - displaying maps in Joomla! CMS
smartin
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 03 Mar 2016, 13:15

JS error and no map displayed with special characters

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: JS error and no map displayed with special characters

Post 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
If you find Phoca extensions useful, please support the project
Post Reply