Verfasst: 14.12.2003 00:38
so klappt es 
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
$tagallowed = false;
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
}
}Code: Alles auswählen
if (strlen($board_config['allow_html_tags']) == 0) // There is no entry in the list of allowed tags, so allow all tags
{
$tagallowed = true;
}
else
{
$tagallowed = false;
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
}
}
}sorry fürs hervorkramen eines alten threads, aber wie kann man diese <br> bei html-code im posting verhindern?Anonymous hat geschrieben:Ich glaube das Problem liegt unter anderem auch darin das das Programm nach Zeilenumbrüchen ein <br /> einfügt, und dies dazu führt das bei längeren Tags (wenn man z.B. das Attribut style="" + css verwendet) der Code für den Browser unlesbar wird.
mfg Moonfire