Better that way
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 28 Oct 2006 22:24:37 +0000 (22:24 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 28 Oct 2006 22:24:37 +0000 (22:24 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1032 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/lists.php

index ef748a8..a30b96d 100644 (file)
@@ -63,11 +63,12 @@ class ListsModule extends PLModule
     function clean_html($res)
     {
         $res = html_entity_decode($res);
-        $res = preg_replace('@<a[^>]*href=["\']([^ >]+)["\'][^>]*>([^<]*)</a>@i', "\\2 [\\1]", $res);
+        $res = preg_replace('@<a[^>]*href=["\']([^ >]+)["\'][^>]*>([^<]*)</a>@ie',
+                            "'\\2 [' . htmlentities('\\1') . ']'", $res);
         $res = preg_replace("@<(/br|p|/div)[^>]*>(\\s*\n)?@i", "\n", $res); 
         $res = trim(strip_tags($res));
         $res = preg_replace("/\n(\\s*\n)+/", "\n\n", $res);
-        return htmlentities($res);
+        return $res;
     }
 
     function handler_lists(&$page)