> I would be happy to commit a corrected patch :) BTW do not worry about
> the missing highlight_php() function, it will be implemented if needed.

I think the patch can be as simple as this.

Jakub Vrana
Index: user-notes.php
===================================================================
RCS file: /repository/php-master-web/manage/user-notes.php,v
retrieving revision 1.34
diff -u -r1.34 user-notes.php
--- user-notes.php      15 Nov 2003 19:45:47 -0000      1.34
+++ user-notes.php      5 Jan 2004 10:41:45 -0000
@@ -295,13 +295,6 @@
 }
 
 function clean_note($text) {
-    $text = htmlspecialchars($text);
-    $fixes = array('<br>','<p>','</p>');
-    reset($fixes);
-    while (list(,$f)=each($fixes)) {
-        $text=str_replace(htmlspecialchars($f), $f, $text);
-        $text=str_replace(htmlspecialchars(strtoupper($f)), $f, $text);
-    }
-    $text = "<tt><pre>".$text."</pre></tt>";
+    $text = highlight_string($text, true);
     return $text;
 }

Reply via email to