Merge branch 'master' of /home/git/platal
[platal.git] / plugins / function.display_address.php
index 25c991e..07ce7c3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -59,7 +59,7 @@ function smarty_function_display_address($param, &$smarty)
 
     $txthtml = "";
     $map = "<a href=\"http://maps.google.fr/?q="
-        .   urlencode(str_replace('États-Unis d\'Amérique', 'USA', implode(", ", $lines) . " ($idt)"))
+        .   urlencode(implode(", ", $lines) . " ($idt)")
         . "\"><img src=\"images/icons/map.gif\" alt=\"Google Maps\" title=\"Carte\"/></a>";
     if ($restore) {
         array_unshift($lines, $idt);
@@ -67,9 +67,9 @@ function smarty_function_display_address($param, &$smarty)
     if ($param['titre'])
     {
         if ($param['titre_div'])
-            $txthtml .= "<div class='titre'>".$param['titre'].$map."</div>\n";
+            $txthtml .= "<div class='titre'>".pl_entity_decode($param['titre'])."&nbsp;".$map."</div>\n";
         else
-            $txthtml .= "<em>".$param['titre']."</em>".$map."<br />\n";
+            $txthtml .= "<em>".pl_entity_decode($param['titre'])."&nbsp;</em>".$map."<br />\n";
     }
     foreach ($lines as $line)
     {