Goetas\Twital\SourceAdapter\XHTMLAdapter::replaceShortTags PHP Méthode

replaceShortTags() protected méthode

protected replaceShortTags ( $str )
    protected function replaceShortTags($str)
    {
        $selfClosingTags = array("area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr");
        $regex = implode("|", array_map(function ($tag) {
            return "></\\s*({$tag})\\s*>";
        }, $selfClosingTags));
        return preg_replace("#{$regex}#i", "/>", $str);
    }