src/Sanitizer.php
protected function cleanHrefs(\DOMElement $element)
    {
        $href = $element->getAttribute('href');
        if (preg_match(self::SCRIPT_REGEX, $href) === 1) {
            $element->removeAttribute('href');
            $this->xmlIssues[] = array(
                'message' => 'Suspicious attribute \'href\'',
                'line' => $element->getLineNo(),
            );
        }
    }
protected function cleanHrefs(\DOMElement $element)
    {
        $href = $element->getAttribute('href');
        if (preg_match(self::SCRIPT_REGEX, $href) === 1) {
            $element->removeAttribute('href');
            $this->xmlIssues[] = array(
                'message' => 'Suspicious attribute \'href\'',
                'line' => $element->getLineNo(),
            );
        }
    }
protected function cleanHrefs ( \ DOMElement $ element ) { $ href = $ element -> getAttribute ( 'href' ) ; if ( preg_match ( self :: SCRIPT_REGEX , $ href ) === 1 ) { $ element -> removeAttribute ( 'href' ) ; $ this -> xmlIssues [ ] = array ( 'message' => 'Suspicious attribute \'href\'' , 'line' => $ element -> getLineNo ( ) , ) ; } }
Clean the hrefs of script and data embeds

@param \DOMElement $element
Clean the hrefs of script and data embeds