PHPHtmlParser\Dom::clearSelfClosingTags PHP Method

clearSelfClosingTags() public method

Sets the list of self closing tags to empty.
    public function clearSelfClosingTags()
    {
        $this->selfClosing = [];
        return $this;
    }

Usage Example

示例#1
0
 public function testLoadClosingTagClearSelfClosingTag()
 {
     $dom = new Dom();
     $dom->clearSelfClosingTags();
     $dom->load('<div class="all"><br><p>Hey bro, <a href="google.com" data-quote="\\"">click here</a></br></div>');
     $this->assertEquals('<br><p>Hey bro, <a href="google.com" data-quote="\\"">click here</a></p></br>', $dom->find('div', 0)->innerHtml);
 }