mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
HTMLSanitizer : add wiki ref to white lists and split declarations one per line (to ease SCM annotation) (restore 2018-04-10 revisions : r5642)
SVN:trunk[5633]
This commit is contained in:
@@ -151,6 +151,11 @@ class HTMLPurifierSanitizer extends HTMLSanitizer
|
|||||||
class HTMLDOMSanitizer extends HTMLSanitizer
|
class HTMLDOMSanitizer extends HTMLSanitizer
|
||||||
{
|
{
|
||||||
protected $oDoc;
|
protected $oDoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
* @see https://www.itophub.io/wiki/page?id=2_5_0%3Aadmin%3Arich_text_limitations
|
||||||
|
*/
|
||||||
protected static $aTagsWhiteList = array(
|
protected static $aTagsWhiteList = array(
|
||||||
'html' => array(),
|
'html' => array(),
|
||||||
'body' => array(),
|
'body' => array(),
|
||||||
@@ -198,16 +203,34 @@ class HTMLDOMSanitizer extends HTMLSanitizer
|
|||||||
'q' => array(),
|
'q' => array(),
|
||||||
'hr' => array('style'),
|
'hr' => array('style'),
|
||||||
'pre' => array(),
|
'pre' => array(),
|
||||||
'center' => array(),
|
|
||||||
'caption' => array(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
protected static $aAttrsWhiteList = array(
|
protected static $aAttrsWhiteList = array(
|
||||||
'src' => '/^(http:|https:|data:)/i',
|
'src' => '/^(http:|https:|data:)/i',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
* @see https://www.itophub.io/wiki/page?id=2_5_0%3Aadmin%3Arich_text_limitations
|
||||||
|
*/
|
||||||
protected static $aStylesWhiteList = array(
|
protected static $aStylesWhiteList = array(
|
||||||
'background-color', 'color', 'float', 'font', 'font-style', 'font-size', 'font-family', 'padding', 'margin', 'border', 'cellpadding', 'cellspacing', 'bordercolor', 'border-collapse', 'width', 'height', 'text-align',
|
'background-color',
|
||||||
|
'border',
|
||||||
|
'border-collapse',
|
||||||
|
'bordercolor',
|
||||||
|
'cellpadding',
|
||||||
|
'cellspacing',
|
||||||
|
'color',
|
||||||
|
'float',
|
||||||
|
'font',
|
||||||
|
'font-family',
|
||||||
|
'font-size',
|
||||||
|
'font-style',
|
||||||
|
'height',
|
||||||
|
'margin',
|
||||||
|
'padding',
|
||||||
|
'text-align',
|
||||||
|
'width',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|||||||
Reference in New Issue
Block a user