2
0
forked from Wavyzz/dolibarr

Fix title encode

This commit is contained in:
mrozniecki
2024-09-20 14:34:34 +02:00
parent 1ee3c5e5a0
commit bad8ee865d

View File

@@ -10364,7 +10364,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param
// We need to urlencode the parameter after the dol_escape_js($tmpurl) because $tmpurl may contain n url with param file=abc%27def if file has a ' inside.
// and when we click on href with this javascript string, a urlcode is done by browser, converted the %27 of file param
return 'javascript:document_preview(\''.urlencode(dol_escape_js($tmpurl)).'\', \''.urlencode(dol_mimetype($relativepath)).'\', \''.urlencode(dol_escape_js($title)).'\')';
return 'javascript:document_preview(\''.urlencode(dol_escape_js($tmpurl)).'\', \''.urlencode(dol_mimetype($relativepath)).'\', \''.rawurlencode(dol_escape_js($title)).'\')';
} else {
return '';
}