mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix search on string that include partial html content
This commit is contained in:
parent
30c212c732
commit
37d9e6e9e9
|
|
@ -376,11 +376,12 @@ if (empty($dolibarr_main_stream_to_disable)) {
|
|||
} else {
|
||||
print implode(', ', $dolibarr_main_stream_to_disable);
|
||||
}
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
$arrayofstreams = stream_get_wrappers();
|
||||
if (!empty($arrayofstreams)) {
|
||||
sort($arrayofstreams);
|
||||
print(implode(',', $arrayofstreams)).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php').')</span>'."\n";
|
||||
print '<span class="wordbreakall">'.implode(',', $arrayofstreams).'</span>';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php').')</span>'."\n";
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -8267,7 +8267,11 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
|||
$out = preg_replace('/&#x?[0-9]+/i', '', $out); // For example if we have javascript with an entities without the ; to hide the 'a' of 'javascript'.
|
||||
|
||||
// Keep only some html tags and remove also some 'javascript:' strings
|
||||
$out = dol_string_onlythesehtmltags($out, 0, ($check == 'restricthtmlallowclass' ? 0 : 1), 1);
|
||||
if ($check == 'restricthtmlallowclass' || $check == 'restricthtmlallowunvalid') {
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 0, 1);
|
||||
} else {
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
|
||||
}
|
||||
|
||||
// Keep only some html attributes and exclude non expected HTML attributes and clean content of some attributes (keep only alt=, title=...).
|
||||
if (getDolGlobalString('MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES')) {
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ if (empty($sortfield)) {
|
|||
}
|
||||
}
|
||||
|
||||
$searchkey = GETPOST('searchstring', 'restricthtmlallowclass');
|
||||
$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid');
|
||||
|
||||
if ($action == 'replacesite' || $mode == 'replacesite') { // Test on permission not required
|
||||
$containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user