summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-07-08 21:58:13 +0000
committerfisharebest <fisharebest@gmail.com>2013-07-08 21:58:13 +0000
commit777f461d5097e88109c27aacefd8b640ddde7792 (patch)
tree3b08d23d5f0f16a73ef7652824cec8caf3b85b6f
parente543401a2ad1e4ad82d024772109ca8af1ce7709 (diff)
downloadwebtrees-777f461d5097e88109c27aacefd8b640ddde7792.tar.gz
webtrees-777f461d5097e88109c27aacefd8b640ddde7792.tar.bz2
webtrees-777f461d5097e88109c27aacefd8b640ddde7792.zip
#1194862 - Google Map doesn't load for individuals with images that have multiline notes
-rw-r--r--modules_v3/googlemap/module.php5
-rw-r--r--modules_v3/googlemap/wt_v3_googlemap.js.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/modules_v3/googlemap/module.php b/modules_v3/googlemap/module.php
index 94768fc007..2bac4ad052 100644
--- a/modules_v3/googlemap/module.php
+++ b/modules_v3/googlemap/module.php
@@ -1264,13 +1264,14 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
'<strong>'.$relationship.'</strong>';
// add thumbnail image
if ($SHOW_HIGHLIGHT_IMAGES) {
- $image = $person->displayImage();
+ $image = addslashes($person->displayImage());
+ $image = str_replace("\n", "\\\n", $image); // May contain multi-line notes
} else {
$image = '';
}
// end of add image
- $dataleft = addslashes($image) . $event . addslashes($name);
+ $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>';
diff --git a/modules_v3/googlemap/wt_v3_googlemap.js.php b/modules_v3/googlemap/wt_v3_googlemap.js.php
index 1a6baf121f..ee902dde6a 100644
--- a/modules_v3/googlemap/wt_v3_googlemap.js.php
+++ b/modules_v3/googlemap/wt_v3_googlemap.js.php
@@ -454,6 +454,7 @@ $STREETVIEW=get_module_setting('googlemap', 'GM_USE_STREETVIEW');
} else {
if ($SHOW_HIGHLIGHT_IMAGES) {
$image = addslashes($this_person->displayImage());
+ $image = str_replace("\n", "\\\n", $image); // May contain multi-line notes
} else {
$image = '';
}
@@ -465,6 +466,7 @@ $STREETVIEW=get_module_setting('googlemap', 'GM_USE_STREETVIEW');
if ($SHOW_HIGHLIGHT_IMAGES) {
if (!empty($gmark['name'])) {
$image2 = addslashes($person->displayImage());
+ $image2 = str_replace("\n", "\\\n", $image2); // May contain multi-line notes
} else {
$image2 = '';
}