Fix error on null
This commit is contained in:
parent
4973019630
commit
118b211807
@ -6582,6 +6582,7 @@ function dol_string_onlythesehtmlattributes($stringtoclean, $allowed_attributes
|
|||||||
} elseif (in_array($attrs->item($ii)->name, array('style'))) {
|
} elseif (in_array($attrs->item($ii)->name, array('style'))) {
|
||||||
$valuetoclean = $attrs->item($ii)->value;
|
$valuetoclean = $attrs->item($ii)->value;
|
||||||
|
|
||||||
|
if (isset($valuetoclean)) {
|
||||||
do {
|
do {
|
||||||
$oldvaluetoclean = $valuetoclean;
|
$oldvaluetoclean = $valuetoclean;
|
||||||
$valuetoclean = preg_replace('/\/\*.*\*\//m', '', $valuetoclean); // clean css comments
|
$valuetoclean = preg_replace('/\/\*.*\*\//m', '', $valuetoclean); // clean css comments
|
||||||
@ -6592,6 +6593,7 @@ function dol_string_onlythesehtmlattributes($stringtoclean, $allowed_attributes
|
|||||||
$valuetoclean = preg_replace('/\s+(top|left|right|bottom)\s*://m', '', $valuetoclean);
|
$valuetoclean = preg_replace('/\s+(top|left|right|bottom)\s*://m', '', $valuetoclean);
|
||||||
}
|
}
|
||||||
} while ($oldvaluetoclean != $valuetoclean);
|
} while ($oldvaluetoclean != $valuetoclean);
|
||||||
|
}
|
||||||
|
|
||||||
$attrs->item($ii)->value = $valuetoclean;
|
$attrs->item($ii)->value = $valuetoclean;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user