Skip to content

Commit eb78df4

Browse files
committed
Fix span stripping
1 parent 5262243 commit eb78df4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/htmLawed/htmLawed.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,12 @@ function hl_bal($t, $do = 1, $in = 'div') {
381381
}
382382
continue;
383383
}
384-
if (!isset($cE[$e])) {
385-
$q[] = $e;
384+
if ($e !== 'span' || !empty($a)) {
385+
if (!isset($cE[$e])) {
386+
$q[] = $e;
387+
}
388+
echo '<', $e, $a, '>';
386389
}
387-
echo '<', $e, $a, '>';
388390
unset($e);
389391
continue;
390392
}

0 commit comments

Comments
 (0)