Camp.php
/**
     * Clean all prohibited tags
     * @return $this
     */
Clean all prohibited tags
@return $this
Clean all prohibited tags @return $this
private function _cleanProhibitedTag(){
        $tags = array(
            'script',   
            'base',
            'frame',
            'frameset',
            'object',
            'param',
            'applet',
            'embed',
            'form',
            'input',    
            'textarea',
            'select',
            'option',
            'style',    
            'link',     
            'meta',     
            'a',        
        );
        foreach($tags as $tag){
            $els = $this->doc->getElementsByTagName($tag);
            if(!$els->length)
                continue;
            for($i=($els->length-1); $i>=0; $i--){
                $el = $els->item($i);
                if($tag == 'input'){
                    if($el->getAttribute('type') == 'button')
                        continue;
                }elseif($tag == 'link'){
                    if($el->getAttribute('rel') == 'canonical')
                        continue;
                }elseif($tag == 'meta'){
                    if(!$el->hasAttribute('http-equiv'))
                        continue;
                }elseif($tag == 'a'){
                    if(substr($el->getAttribute('href'), 0, 11) == 'javascript:'){
                        if(strtolower($el->getAttribute('target')) == '_blank')
                            continue;
                    }else{
                        continue;
                    }
                }
                $el->parentNode->removeChild($el);
            }
        }
        return $this;
    }
private function _cleanProhibitedTag ( ) { $ tags = array ( 'script' , 'base' , 'frame' , 'frameset' , 'object' , 'param' , 'applet' , 'embed' , 'form' , 'input' , 'textarea' , 'select' , 'option' , 'style' , 'link' , 'meta' , 'a' , ) ; foreach ( $ tags as $ tag ) { $ els = $ this -> doc -> getElementsByTagName ( $ tag ) ; if ( ! $ els -> length ) continue ; for ( $ i = ( $ els -> length - 1 ) ; $ i >= 0 ; $ i -- ) { $ el = $ els -> item ( $ i ) ; if ( $ tag == 'input' ) { if ( $ el -> getAttribute ( 'type' ) == 'button' ) continue ; } elseif ( $ tag == 'link' ) { if ( $ el -> getAttribute ( 'rel' ) == 'canonical' ) continue ; } elseif ( $ tag == 'meta' ) { if ( ! $ el -> hasAttribute ( 'http-equiv' ) ) continue ; } elseif ( $ tag == 'a' ) { if ( substr ( $ el -> getAttribute ( 'href' ) , 0 , 11 ) == 'javascript:' ) { if ( strtolower ( $ el -> getAttribute ( 'target' ) ) == '_blank' ) continue ; } else { continue ; } } $ el -> parentNode -> removeChild ( $ el ) ; } } return $ this ; }
Clean all prohibited tags
 @return $this
Clean all prohibited tags @return $this
// The `application/ld+jxon` should be on head tag. // except type is `button`. // accepted only on head tag. // accepted if rel is `canonical`. // only if with attribute `http-equiv`. // if href start with `javascript:` and target is not `_blank`. //             'svg'       // TODO