[Core][Util] Hotfix: In App\Core\DB\DB persistWithSameId, casting the id to an int. In App\Util\HTML html, tag is now evaluated beforehand, making sure it's a string.

This commit is contained in:
2021-10-19 21:06:23 +01:00
committed by Diogo Peralta Cordeiro
parent f78cfed41a
commit 99fd2f725b
2 changed files with 2 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ abstract class HTML
$out .= "<{$tag}/>";
} else {
$attrs = isset($contents['attrs']) ? self::attr(array_shift($contents), $options) : '';
$is_tag = preg_match('/[A-Za-z][A-Za-z0-9]*/', $tag);
$is_tag = is_string($tag) && preg_match('/[A-Za-z][A-Za-z0-9]*/', $tag);
$inner = self::html($contents, $options, $indent + 1);
if ($is_tag) {
if (!\in_array($tag, array_merge($options['allowed_tags'] ?? [], self::ALLOWED_TAGS))) {