1
0
mirror of https://github.com/php/web-php.git synced 2026-03-30 11:12:09 +02:00

Ok, give up on allowing any tags other than br and p in the user notes.

Anything else can and will screw up the manual pages.  I know this makes
a lot of the user-contributed code examples hard to read, but we'll just
have to live with that.
This commit is contained in:
Rasmus Lerdorf
2000-07-02 16:10:39 +00:00
parent fcab321afb
commit ed342a3667

View File

@@ -158,13 +158,14 @@ function makeEntry($date,$name,$blurb,$id=0) {
</TD></TR>
<TR BGCOLOR="#F0F0F0"><TD>
<?
$blurb = htmlspecialchars($blurb);
$fixes = array('<pre>', '</pre>', '<tt>', '</tt>', '<br>', '<p>' );
reset($fixes);
while (list(,$f)=each($fixes)) {
$blurb=str_replace(htmlspecialchars($f), $f, $blurb);
$blurb=str_replace(htmlspecialchars(strtoupper($f)), $f, $blurb);
}
$blurb = strip_tags($blurb,'<br><p>');
# $blurb = htmlspecialchars($blurb);
# $fixes = array('<pre>', '</pre>', '<tt>', '</tt>', '<br>', '<p>' );
# reset($fixes);
# while (list(,$f)=each($fixes)) {
# $blurb=str_replace(htmlspecialchars($f), $f, $blurb);
# $blurb=str_replace(htmlspecialchars(strtoupper($f)), $f, $blurb);
# }
echo $blurb;
?><BR>
<?if (isset($MAGIC_COOKIE)):?>