aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/text.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 335dd46ba..ee0fef262 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1307,7 +1307,9 @@ function format_filer(&$item) {
function generate_map($coord) {
- $arr = array('lat' => substr($coord,0,strpos($coord,' ')), 'lon' => substr($coord,strpos($coord,' ')+1), 'html' => '');
+ $coord = trim($coord);
+ $coord = str_replace(array(',','/',' '),array(' ',' ',' '),$coord);
+ $arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => '');
call_hooks('generate_map',$arr);
return $arr['html'];
}