Changeset 11708

Show
Ignore:
Timestamp:
08/24/07 11:53:49 (1 year ago)
Author:
solt
Message:

Convert special chars in JS map invocation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/org.routamc.positioning/map.php

    r11267 r11708  
    222222        echo "var marker_{$i} = new Marker(new LatLonPoint({$lat}, {$lon}))\n"; 
    223223         
    224         echo "marker_{$i}.setLabel('{$marker['title']}');\n"; 
     224                $title = htmlspecialchars($marker['title'],ENT_QUOTES); 
     225        echo "marker_{$i}.setLabel('{$title}');\n"; 
    225226         
    226227        if (isset($marker['abstract'])) 
    227228        { 
    228             echo "marker_{$i}.setInfoBubble('{$marker['abstract']}');\n"; 
     229                        $abstract = htmlspecialchars($marker['abstract'],ENT_QUOTES); 
     230            echo "marker_{$i}.setInfoBubble('{$abstract}');\n"; 
    229231        } 
    230232