Re: user-notes.php preview

From: Date: Mon, 05 Jan 2004 11:12:32 +0000
Subject: Re: user-notes.php preview
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357939@lists.php.net to get a copy of this message
> 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; }
« previous php.doc (#969357939) next »