CMS MADE SIMPLE FORGE

CGGoogleMaps2

 

[#11948] URLs and IMG are double escaped in Marker Point Descriptions / BubbleText / Info Window

avatar
Created By: Phil Scoltock (mantapro)
Date Submitted: Thu Jan 17 00:36:32 -0500 2019

Assigned To: Robert Campbell (calguy1000)
Version: 1.1.1
CMSMS Version: 2.2.8
Severity: Minor
Resolution: None
State: Open
Summary:
URLs and IMG are double escaped in Marker Point Descriptions / BubbleText / Info Window
Detailed Description:
As described here
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=78122&hilit=cggooglemaps2

These two areas of code in
modules\CGGoogleMaps2\lib\class.cggm2_map_generator.php

result in <img src=   and <a href= in the marker description being double
escaped and therefore failing to be rendered by the browser.

261: if( $marker->get_description() ) $rec['bubbletext'] =
addslashes($marker->get_description());
593: $out = json_encode($data);

The html in a marker is written to the DB OK ; but
modules\CGGoogleMaps2\lib\class.cggm2_map_generator.php  when generating the map
instance generates too many back slashes. Employing addslashes in line 261 seems
the culprit - works if removed


History