|
|
@ -380,10 +380,11 @@ class rcube_utils
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Replace all css definitions with #container [def]
|
|
|
|
* Replace all css definitions with #container [def]
|
|
|
|
* and remove css-inlined scripting
|
|
|
|
* and remove css-inlined scripting, make position style safe
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string CSS source code
|
|
|
|
* @param string CSS source code
|
|
|
|
* @param string Container ID to use as prefix
|
|
|
|
* @param string Container ID to use as prefix
|
|
|
|
|
|
|
|
* @param bool Allow remote content
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return string Modified CSS source
|
|
|
|
* @return string Modified CSS source
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -411,6 +412,9 @@ class rcube_utils
|
|
|
|
$length = $pos2 - $pos - 1;
|
|
|
|
$length = $pos2 - $pos - 1;
|
|
|
|
$styles = substr($source, $pos+1, $length);
|
|
|
|
$styles = substr($source, $pos+1, $length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Convert position:fixed to position:absolute (#5264)
|
|
|
|
|
|
|
|
$styles = preg_replace('/position:[\s\r\n]*fixed/i', 'position: absolute', $styles);
|
|
|
|
|
|
|
|
|
|
|
|
// check every line of a style block...
|
|
|
|
// check every line of a style block...
|
|
|
|
if ($allow_remote) {
|
|
|
|
if ($allow_remote) {
|
|
|
|
$a_styles = preg_split('/;[\r\n]*/', $styles, -1, PREG_SPLIT_NO_EMPTY);
|
|
|
|
$a_styles = preg_split('/;[\r\n]*/', $styles, -1, PREG_SPLIT_NO_EMPTY);
|
|
|
|