mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-17 23:11:29 +01:00
Fix link for warning
This commit is contained in:
@@ -1970,7 +1970,9 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta
|
||||
// For case of tag with attribute
|
||||
$reg = array();
|
||||
if (preg_match('/<'.preg_quote($tagtoreplace, '/').'\s+([^>]+)>/', $tmp, $reg)) {
|
||||
$tmpattributes = str_ireplace(array('[', ']'), '_', $reg[1]); // We must not have [ ] inside the attribute string
|
||||
$tmpattributes = str_ireplace(array('[', ']'), '_', $reg[1]); // We must never have [ ] inside the attribute string
|
||||
$tmpattributes = str_ireplace('href="http:', '__HREFHTTPA', $tmpattributes);
|
||||
$tmpattributes = str_ireplace('href="https:', '__HREFHTTPSA', $tmpattributes);
|
||||
$tmpattributes = str_ireplace('src="http:', '__SRCHTTPIMG', $tmpattributes);
|
||||
$tmpattributes = str_ireplace('src="https:', '__SRCHTTPSIMG', $tmpattributes);
|
||||
$tmpattributes = str_ireplace('"', '__DOUBLEQUOTE', $tmpattributes);
|
||||
@@ -1997,6 +1999,8 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta
|
||||
$result = preg_replace('/__BEGINENDTAGTOREPLACE'.$tagtoreplace.'\[(.*)\]__/', '<'.$tagtoreplace.' \1 />', $result);
|
||||
}
|
||||
|
||||
$result = str_ireplace('__HREFHTTPA', 'href="http:', $result);
|
||||
$result = str_ireplace('__HREFHTTPSA', 'href="https:', $result);
|
||||
$result = str_ireplace('__SRCHTTPIMG', 'src="http:', $result);
|
||||
$result = str_ireplace('__SRCHTTPSIMG', 'src="https:', $result);
|
||||
$result = str_ireplace('__DOUBLEQUOTE', '"', $result);
|
||||
|
||||
Reference in New Issue
Block a user