public function parse($content, $locale)
{
$sortedTags = $this->getTags($content);
if (0 === count($sortedTags)) {
return $content;
}
foreach ($sortedTags as $name => $tags) {
$tags = $this->tagRegistry->getTag($name, 'html')->parseAll($tags, $locale);
foreach ($tags as $tag => $newTag) {
$content = str_replace($tag, $newTag, $content);
}
}
return $content;
}