public static function getElementsTagsInWysiwyg($text)
{
if (!is_string($text) || strlen($text) < 1) {
return [];
}
$hash = "elements_raw_wysiwyg_text_" . md5($text);
if (\Zend_Registry::isRegistered($hash)) {
return \Zend_Registry::get($hash);
}
//$text = Pimcore_Tool_Text::removeLineBreaks($text);
preg_match_all("@\\<(a|img)[^>]*((?:pimcore_id|pimcore_type)+=\"[0-9]+\")[^>]*((?:pimcore_id|pimcore_type)+=\"[asset|document|object]+\")[^>]*\\>@msUi", $text, $matches);
\Zend_Registry::set($hash, $matches);
return $matches;
}