extends |
HTMLPurifier_Filter |
|---|
This filter extracts <style> blocks from input HTML, cleans them up using CSSTidy, and then places them in $purifier->context->get('StyleBlocks') so they can be used elsewhere in the document.
| Methods | ||||||
|---|---|---|---|---|---|---|
public
|
__construct()
|
# | ||||
protected
|
styleCallback(array $matches)
Save the contents of CSS blocks to style matches
Save the contents of CSS blocks to style matches Parameters
|
# | ||||
public
|
preFilter(string $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context): string
Removes inline <style> tags from HTML, saves them for later use
Removes inline <style> tags from HTML, saves them for later use Overrides |
# | ||||
public
|
cleanCSS(string $css, HTMLPurifier_Config $config, HTMLPurifier_Context $context): string
Takes CSS (the stuff found in <style>) and cleans it.
Takes CSS (the stuff found in <style>) and cleans it. Parameters
ReturnsCleaned CSS Throws
|
# | ||||
| Methods inherited from HTMLPurifier_Filter |
|---|
postFilter() |
| Properties | |||
|---|---|---|---|
public
|
|
$name = 'ExtractStyleBlocks'
|
# |