wp/lib/blobfolio/wp/bm/svg/svg_fallback.php
public static function split_tags($matches) {
		$raw = \wp_kses_stripslashes($matches[0]);

		// It matched a ">" character.
		if (\substr($raw, 0, 1) !== '<') {
			return '&gt;';
		}

		// It's seriously malformed.
		if (! \preg_match('%^<\s*(/\s*)?([a-zA-Z0-9-:]+)([^>]*)>?$%', $raw, $matches)) {
			return '';
		}

		$slash = \trim($matches[1]);
		$endslash = \preg_match('/\/\s*>/', $raw) ? '/' : '';
		$tag = $matches[2];
		$attributes = $matches[3];

		// Closing tag.
		if ($slash) {
			return "</$tag>";
		}

		// Allowed values.
		$allowed_attributes = static::get_allowed_attributes();

		$parsed_attributes = static::kses_hair($attributes);
		$accepted_attributes = array();
		foreach ($parsed_attributes as $attr) {
			$attribute_name = mb::strtolower($attr['name']);

			// Bad attribute: not whitelisted.
			// data-* is implicitly whitelisted.
			if (
				! \preg_match('/^data\-/', $attribute_name) &&
				! \preg_match('/^xmlns:/', $attribute_name) &&
				! \in_array($attribute_name, $allowed_attributes, true)
			) {
				continue;
			}

			$accepted_attributes[] = $attr['whole'];
		}

		return "<$tag" . (\count($accepted_attributes) ? ' ' . \implode(' ', $accepted_attributes) : '') . "$endslash>";
	}
public static function split_tags($matches) {
		$raw = \wp_kses_stripslashes($matches[0]);

		// It matched a ">" character.
		if (\substr($raw, 0, 1) !== '<') {
			return '&gt;';
		}

		// It's seriously malformed.
		if (! \preg_match('%^<\s*(/\s*)?([a-zA-Z0-9-:]+)([^>]*)>?$%', $raw, $matches)) {
			return '';
		}

		$slash = \trim($matches[1]);
		$endslash = \preg_match('/\/\s*>/', $raw) ? '/' : '';
		$tag = $matches[2];
		$attributes = $matches[3];

		// Closing tag.
		if ($slash) {
			return "</$tag>";
		}

		// Allowed values.
		$allowed_attributes = static::get_allowed_attributes();

		$parsed_attributes = static::kses_hair($attributes);
		$accepted_attributes = array();
		foreach ($parsed_attributes as $attr) {
			$attribute_name = mb::strtolower($attr['name']);

			// Bad attribute: not whitelisted.
			// data-* is implicitly whitelisted.
			if (
				! \preg_match('/^data\-/', $attribute_name) &&
				! \preg_match('/^xmlns:/', $attribute_name) &&
				! \in_array($attribute_name, $allowed_attributes, true)
			) {
				continue;
			}

			$accepted_attributes[] = $attr['whole'];
		}

		return "<$tag" . (\count($accepted_attributes) ? ' ' . \implode(' ', $accepted_attributes) : '') . "$endslash>";
	}
Callback for static::sanitize() tag splitting

@see { wp_kses_split2() }

@param string $matches Matches.
@return string Sanitized match replacement.