Skip to content
Snippets Groups Projects
Commit 3bb4c0a1 authored by JediKev's avatar JediKev
Browse files

issue: Rogue Closing div Breaks HTML Thread Tree

This addresses an issue reported by Vincent Monier (Xenos) where posting a
single `</div>` tag as a message or response via the UI will break the HTML
Thread Tree view. This is due to the `html_balance()` method not cleaning
empty div tags. This adds `'div'=>1` to the empty tag array so that any
rogue div tag + any empty div tags are properly removed.
parent bbfff1a2
No related branches found
No related tags found
No related merge requests found
......@@ -138,7 +138,7 @@ class Format {
$xpath = new DOMXPath($doc);
static $eE = array('area'=>1, 'br'=>1, 'col'=>1, 'embed'=>1,
'iframe' => 1, 'hr'=>1, 'img'=>1, 'input'=>1,
'isindex'=>1, 'param'=>1);
'isindex'=>1, 'param'=>1, 'div'=>1);
do {
$done = true;
$nodes = $xpath->query('//*[not(text()) and not(node())]');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment