diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index d585122bf92..3b3bcacb018 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1015,7 +1015,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
// Help
print '
';
//print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20', 0, 2, 1);
- print ''.img_picto(($objMod->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'';
+ print ''.img_picto(($objMod->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'';
print ' | ';
// Version
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 872b61fdd34..f320396ef12 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -10531,7 +10531,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param
// old behavior, return a string
if ($isAllowedForPreview) {
- return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.urlencode($relativepath).($param ? '&'.$param : '')).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js($langs->trans('Preview')).'\')';
+ return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.urlencode($modulepart).'&attachment=0&file='.urlencode($relativepath).($param ? '&'.$param : '')).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js($langs->trans('Preview')).'\')';
} else {
return '';
}
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index a5021a030d1..08abdcb40ab 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -2480,7 +2480,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$return .= '
';
$return .= '';