Closed (fixed)
Project:
GMap Module
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2006 at 06:28 UTC
Updated:
3 Jun 2008 at 00:12 UTC
before:
function gmap_sanitize(&$gmap){
//sanitizes the gmap variables to reduce the possibility of javascript inserts
foreach ($gmap as $key=>$value) {
if ($key=='id') {
$out = array();
preg_match('([a-zA-Z1-9_-]*)', $value, $out);
if (strlen($out[0])==0) {
$out[0]='map';
}
$gmap[$key]=$out[0];
}
else {
$gmap[$key]=str_replace(';','',$value);
}
}
}
after:
function gmap_sanitize(&$gmap){
//sanitizes the gmap variables to reduce the possibility of javascript inserts
foreach ($gmap as $key=>$value) {
//ibis: preg_match & str_replace not work with array
if (!is_array($value)){
if ($key=='id') {
$out = array();
preg_match('([a-zA-Z1-9_-]*)', $value, $out);
if (strlen($out[0])==0) {
$out[0]='map';
}
$gmap[$key]=$out[0];
}
else {
$gmap[$key]=str_replace(';','',$value);
}
}
else gmap_sanitize($value);
}
}
Comments
Comment #1
bdragon commentedhttp://drupal.org/cvs?commit=117036
;)
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.