This commit is contained in:
joyqi 2017-10-30 11:50:35 +08:00
parent ac1c62a07d
commit c056f6c895

View File

@ -543,6 +543,12 @@ EOF;
if ($attrLength > 0 && "/" == trim($startTags[2][$key][$attrLength - 1])) {
continue;
}
// 白名单
if (preg_match("/^(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i", $tag)) {
continue;
}
if (!empty($closeTags[1]) && $closeTagsIsArray) {
if (false !== ($index = array_search($tag, $closeTags[1]))) {
unset($closeTags[1][$index]);