If the page text looks like it contains HTML code, just output it normally, but if it does not contain HTML code, then perform a nl2br() on the text before it outputs

This commit is contained in:
james 2006-01-18 21:28:00 +00:00
parent aba757375a
commit 652e8fe321

View File

@ -766,7 +766,12 @@ function output_page_text($textname)
$q=mysql_query("SELECT * FROM pagetext WHERE textname='$textname' AND year='-1'");
$r=mysql_fetch_object($q);
}
echo nl2br(i18n($r->text));
//if it looks like we have HTML content, dont do a nl2br, if there's no html, then do the nl2br
if(strlen($r->text)==strlen(strip_tags($r->text)))
echo nl2br(i18n($r->text));
else
echo i18n($r->text);
}
function generatePassword()