Commit 3342e5d3 authored by Taddeus Kroes's avatar Taddeus Kroes

Code cleanup

parent d40e8181
...@@ -16,11 +16,11 @@ function clean_html($html) { ...@@ -16,11 +16,11 @@ function clean_html($html) {
case '<': case '<':
$in_tag = true; $in_tag = true;
$cleaned .= clean_tag_content($stack) . '<'; $cleaned .= clean_tag_content($stack) . '<';
$stack = '';
break; break;
case '>': case '>':
$in_tag = false; $in_tag = false;
$cleaned .= '>'; $cleaned .= '>';
$stack = '';
break; break;
default: default:
if ($in_tag) if ($in_tag)
...@@ -30,7 +30,8 @@ function clean_html($html) { ...@@ -30,7 +30,8 @@ function clean_html($html) {
} }
} }
$cleaned .= $stack; if (!$in_tag)
$cleaned .= clean_tag_content($stack);
return $cleaned; return $cleaned;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment