BUGFIX: Use , not semantics tags after preprocessing tags, fixes in_array bugs

namespaces
Frank Ronny Larsen 2013-07-11 13:12:17 +02:00
parent b487f452d6
commit 27345e22f8
1 changed files with 4 additions and 4 deletions

View File

@ -1203,16 +1203,16 @@ class H5PContentValidator {
} }
// Add related tags for table etc. // Add related tags for table etc.
if (in_array('table', $semantics->tags)) { if (in_array('table', $tags)) {
$tags = array_merge($tags, array('tr', 'td', 'th', 'colgroup', 'thead', 'tbody', 'tfoot')); $tags = array_merge($tags, array('tr', 'td', 'th', 'colgroup', 'thead', 'tbody', 'tfoot'));
} }
if (in_array('b', $semantics->tags)) { if (in_array('b', $tags)) {
$tags[] = 'strong'; $tags[] = 'strong';
} }
if (in_array('i', $semantics->tags)) { if (in_array('i', $tags)) {
$tags[] = 'em'; $tags[] = 'em';
} }
if (in_array('ul', $semantics->tags) || in_array('ol', $semantics->tags)) { if (in_array('ul', $tags) || in_array('ol', $tags)) {
$tags[] = 'li'; $tags[] = 'li';
} }
$allowedtags = implode('', array_map(array($this, 'bracketTags'), $tags)); $allowedtags = implode('', array_map(array($this, 'bracketTags'), $tags));