From: x2003bruneau Date: Sat, 28 Oct 2006 22:24:37 +0000 (+0000) Subject: Better that way X-Git-Tag: xorg/0.9.12~158 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4e2929c6e6e7e5e175719a007a79598952bd9023;p=platal.git Better that way git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1032 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/lists.php b/modules/lists.php index ef748a8..a30b96d 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -63,11 +63,12 @@ class ListsModule extends PLModule function clean_html($res) { $res = html_entity_decode($res); - $res = preg_replace('@]*href=["\']([^ >]+)["\'][^>]*>([^<]*)@i', "\\2 [\\1]", $res); + $res = preg_replace('@]*href=["\']([^ >]+)["\'][^>]*>([^<]*)@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)