abenzer/represent-map

Marker's infowindows don't always display all the required info

Closed this issue · 2 comments

Please visit http://www.geneva-startups.ch

If you click on the marker corresponding to the investor Index Ventures, you'll see no info missing, i.e. all the info required (company name, url, description and address) is correctly displayed.
However, when you click on most of the other markers, the info is very incomplete, i.e. often the description and/or address is missing.

The info is available in my places table, so I wonder what could be causing this?

The problem here is similar to issue#78. Wherever content in a record contains French accents, such as "è", then the content doesn't get displayed.

I would very much appreciate if the developers would provide some help and instruct me what changes need to be made to index.php for the code to accept French accents. I believe the problem lies in the following code, but I don't understand what it does:
while($place = mysql_fetch_assoc($places)) {
$place[title] = htmlspecialchars_decode(addslashes(htmlspecialchars($place[title])));
$place[description] = str_replace(array("\n", "\t", "\r"), "", htmlspecialchars_decode(addslashes(htmlspecialchars($place[description]))));
$place[uri] = addslashes(htmlspecialchars($place[uri]));
$place[address] = htmlspecialchars_decode(addslashes(htmlspecialchars($place[address])));

OK, making the following changes to the code on lines 185 to 188 fixed the issue:
while($place = mysql_fetch_assoc($places)) {
$place[title] = htmlspecialchars_decode(addslashes(htmlspecialchars(utf8_encode($place[title]),ENT_COMPAT,'UTF-8', true)));
$place[description] = str_replace(array("\n", "\t", "\r"), "", htmlspecialchars_decode(addslashes(htmlspecialchars(utf8_encode($place[description]),ENT_COMPAT,'UTF-8', true))));
$place[uri] = addslashes(htmlspecialchars(utf8_encode($place[uri]),ENT_COMPAT,'UTF-8', true));
$place[address] = htmlspecialchars_decode(addslashes(htmlspecialchars(utf8_encode($place[address]),ENT_COMPAT,'UTF-8', true)));