From 0f0f12a4537332ee1b7ff304e53000674d159a97 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 17 Dec 2014 16:11:21 -0800 Subject: allow a variety of latitude/longitude delimiters since nobody can agree on them. --- include/text.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/text.php') 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']; } -- cgit v1.2.3