summaryrefslogtreecommitdiff
path: root/modules_v3
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-10-11 22:15:05 +0100
committerGreg Roach <fisharebest@gmail.com>2013-10-11 22:15:05 +0100
commit86097718bfb483bca1e0b8c4e9de4a6426c0ce10 (patch)
treecb30021a87751687d387a47da865c87cc2cbba94 /modules_v3
parent52bdaee95b318f5045421ad6df231b301bc8d97c (diff)
downloadwebtrees-86097718bfb483bca1e0b8c4e9de4a6426c0ce10.tar.gz
webtrees-86097718bfb483bca1e0b8c4e9de4a6426c0ce10.tar.bz2
webtrees-86097718bfb483bca1e0b8c4e9de4a6426c0ce10.zip
#1237520 - Pedigree Map runs and runs when place has " - dev
Diffstat (limited to 'modules_v3')
-rw-r--r--modules_v3/googlemap/module.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules_v3/googlemap/module.php b/modules_v3/googlemap/module.php
index b939e6fc0d..6dd89f7ccf 100644
--- a/modules_v3/googlemap/module.php
+++ b/modules_v3/googlemap/module.php
@@ -1248,19 +1248,17 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
'<strong>'.$relationship.'</strong>';
// add thumbnail image
if ($SHOW_HIGHLIGHT_IMAGES) {
- $image = addslashes($person->displayImage());
+ $image = WT_Filter::escapeJs($person->displayImage());
$image = str_replace("\n", "\\\n", $image); // May contain multi-line notes
} else {
$image = '';
}
// end of add image
- $dataleft = $image . $event . addslashes($name);
- $datamid = " <span><a href='".$person->getHtmlUrl()."' id='alturl' title='" . WT_I18N::translate('Individual information') . "'>";
- $datamid .= '('.WT_I18N::translate('View person').')';
- $datamid .= '</a></span>';
+ $dataleft = $image . $event . WT_Filter::escapeJs($name);
+ $datamid = " <span><a href='".$person->getHtmlUrl()."'></a></span>";
$dataright = '<br><strong>'. WT_I18N::translate('Birth:') . '&nbsp;</strong>' .
- addslashes($person->getBirthDate()->Display(false)).'<br>'.$person->getBirthPlace();
+ WT_Filter::escapeJs($person->getBirthDate()->Display(false)).' — '.WT_Filter::escapeJs($person->getBirthPlace());
$latlongval[$i] = get_lati_long_placelocation($person->getBirthPlace());
if ($latlongval[$i]) {
@@ -1302,7 +1300,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
}
}
$js.= 'var point = new google.maps.LatLng('.$lat[$i].','.$lon[$i].');';
- $js.= "var marker = createMarker(point, \"".addslashes($name)."\",\n\t\"<div>".$dataleft.$datamid.$dataright."</div>\", \"";
+ $js.= "var marker = createMarker(point, \"".WT_Filter::escapeJs($name)."\",\n\t\"<div>".$dataleft.$datamid.$dataright."</div>\", \"";
$js.= "<div class='iwstyle'>";
$js.= "<a href='module.php?ged=".WT_GEDURL."&amp;mod=googlemap&amp;mod_action=pedigree_map&amp;rootid=" . $person->getXref() . "&amp;PEDIGREE_GENERATIONS={$PEDIGREE_GENERATIONS}";
if ($hideflags) $js.= '&amp;hideflags=1';
@@ -1677,8 +1675,8 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$long[$z]="<td class='error center'><strong>X</strong></td>";$matched[$x]++;
}
$level++;
- $mapstr3=$mapstr3."&amp;parent[".$z."]=".addslashes($row['pl_placerequested']);
- $mapstr4=$mapstr4."&amp;parent[".$z."]=".addslashes(rtrim(ltrim($levels[$z])));
+ $mapstr3=$mapstr3."&amp;parent[".$z."]=".WT_Filter::escapeJs($row['pl_placerequested']);
+ $mapstr4=$mapstr4."&amp;parent[".$z."]=".WT_Filter::escapeJs($levels[$z]);
$z++;
}
if ($matching) {