SECURITY: remove style and class bbcodes

This commit is contained in:
friendica 2014-01-28 16:35:10 -08:00
parent d79a2e3b55
commit 3dfd38021f

View File

@ -442,14 +442,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
// Check for list text
$Text = str_replace("[*]", "<li>", $Text);
// Check for style sheet commands
if (strpos($Text,'[/style]') !== false) {
$Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","<span style=\"$1;\">$2</span>",$Text);
}
// Check for CSS classes
if (strpos($Text,'[/class]') !== false) {
$Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","<span class=\"$1\">$2</span>",$Text);
}
// handle nested lists
$endlessloop = 0;