forked from Wavyzz/dolibarr
Fix libxml_disable_entity_loader(true) must be called only if LIBXML is
lower than 20900 (disabled by default for libxml 2.9.0)
This commit is contained in:
@@ -7613,7 +7613,11 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
||||
if (!empty($out) && getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML') && $check != 'restricthtmlallowunvalid') {
|
||||
try {
|
||||
libxml_use_internal_errors(false); // Avoid to fill memory with xml errors
|
||||
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only if LIBXML_VERSION < 20900
|
||||
if (LIBXML_VERSION < 20900) {
|
||||
// Avoid load of external entities (security problem).
|
||||
// Required only if LIBXML_VERSION < 20900
|
||||
libxml_disable_entity_loader(true);
|
||||
}
|
||||
|
||||
$dom = new DOMDocument();
|
||||
// Add a trick to solve pb with text without parent tag
|
||||
|
||||
Reference in New Issue
Block a user