Method |
Description |
|
__construct ( PicoFeed\Client\Url $website ) |
Constructor. |
|
addAttributes ( string $tag, array $attributes ) : array |
Automatically add/override some attributes for specific tags. |
|
filter ( string $tag, array $attributes ) : array |
Apply filters to the attributes list. |
|
filterAllowedAttribute ( string $tag, string $attribute, string $value ) : boolean |
Return true if the value is allowed (remove not allowed attributes). |
|
filterBlacklistResourceAttribute ( string $tag, string $attribute, string $value ) : boolean |
Return true if the resource is not blacklisted (remove blacklisted resource attributes). |
|
filterIframeAttribute ( string $tag, string $attribute, string $value ) : boolean |
Return true if the iframe source is allowed (remove not allowed iframe). |
|
filterIntegerAttribute ( string $tag, string $attribute, string $value ) : boolean |
Return true if the value is not integer (remove attributes that should have an integer value). |
|
filterProtocolUrlAttribute ( string $tag, string $attribute, string $value ) : boolean |
Return true if the scheme is authorized. |
|
hasRequiredAttributes ( string $tag, array $attributes ) : boolean |
Return true if all required attributes are present. |
|
isAllowedProtocol ( string $value ) : boolean |
Detect if the protocol is allowed or not. |
|
isBlacklistedMedia ( string $resource ) : boolean |
Detect if an url is blacklisted. |
|
isResource ( string $attribute ) : boolean |
Check if an attribute name is an external resource. |
|
removeYouTubeAutoplay ( string $tag, array $attribute, string &$value ) : boolean |
Removes YouTube autoplay from iframes. |
|
rewriteAbsoluteUrl ( string $tag, string $attribute, string &$value ) : boolean |
Convert all relative links to absolute url. |
|
rewriteImageProxyUrl ( string $tag, string $attribute, string &$value ) : boolean |
Rewrite image url to use with a proxy. |
|
secureIframeSrc ( string $tag, array $attribute, string &$value ) : boolean |
Turns iframes' src attribute from http to https to prevent
mixed active content. |
|
setAttributeOverrides ( array $values ) : Attribute |
Set attributes to automatically to specific tags. |
|
setIframeWhitelist ( array $values ) : Attribute |
Set allowed iframe resources. |
|
setImageProxyCallback ( Closure $callback ) : Attribute |
Set image proxy callback. |
|
setImageProxyProtocol ( string $value ) : Attribute |
Set image proxy protocol restriction. |
|
setImageProxyUrl ( string $url ) : Attribute |
Set image proxy URL. |
|
setIntegerAttributes ( array $values ) : Attribute |
Set attributes that must be an integer. |
|
setMediaAttributes ( array $values ) : Attribute |
Set media attributes (used to load external resources). |
|
setMediaBlacklist ( array $values ) : Attribute |
Set blacklisted external resources. |
|
setRequiredAttributes ( array $values ) : Attribute |
Set mandatory attributes for whitelisted tags. |
|
setSchemeWhitelist ( array $values ) : Attribute |
Set scheme whitelist. |
|
setWhitelistedAttributes ( array $values ) : Attribute |
Set whitelisted tags and attributes for each tag. |
|
toHtml ( array $attributes ) : string |
Convert the attribute list to html. |
|