diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 677efccfdee..10a31b215f7 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -113,7 +113,7 @@ class FormFile
if (! empty($options)) $out .= '
'.$options.' | ';
- $out .= '';
+ $out .= ' | ';
$max=$conf->global->MAIN_UPLOAD_DOC; // En Kb
$maxphp=@ini_get('upload_max_filesize'); // En inconnu
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 9e7bb7f7ce8..26d9f50b3b6 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4886,7 +4886,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
global $conf;
$path = '';
-
+
$arrayforoldpath=array('cheque','user','category','holiday','supplier_invoice','invoice_supplier','mailing','supplier_payment');
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) $arrayforoldpath[]='product';
if (! empty($level) && in_array($modulepart, $arrayforoldpath))
@@ -5133,7 +5133,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
* @param int $removelasteolbr 1=Remove last br or lasts \n (default), 0=Do nothing
* @return string String encoded
*/
-function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8',$removelasteolbr=1)
+function dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
{
$newstring=$stringtoencode;
if (dol_textishtml($stringtoencode)) // Check if text is already HTML or not
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index 197e050f48a..bbe9a0fecad 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -93,6 +93,8 @@ function dolWebsiteOutput($content)
// Fix relative link /document.php with correct URL after the DOL_URL_ROOT: ...href="/document.php?modulepart="
$content=preg_replace('/(href=")(\/?document\.php\?[^\"]*modulepart=[^\"]*)(\")/', '\1'.DOL_URL_ROOT.'\2\3"', $content, -1, $nbrep);
+ $content=preg_replace('/(src=")(\/?document\.php\?[^\"]*modulepart=[^\"]*)(\")/', '\1'.DOL_URL_ROOT.'\2\3"', $content, -1, $nbrep);
+
// Fix relative link /viewimage.php with correct URL after the DOL_URL_ROOT: ...href="/viewimage.php?modulepart="
$content=preg_replace('/(href=")(\/?viewimage\.php\?[^\"]*modulepart=[^\"]*)(\")/', '\1'.DOL_URL_ROOT.'\2\3"', $content, -1, $nbrep);
@@ -118,6 +120,7 @@ function dolWebsiteOutput($content)
}
else
{
+ $content=preg_replace('/('."\n";
+$htmlheadercontentdefault.=''."\n";
+$htmlheadercontentdefault.=''."\n";
+$htmlheadercontentdefault.=''."\n";
+$htmlheadercontentdefault.=''."\n";
+$htmlheadercontentdefault.=''."\n";
+
/*
* Actions
@@ -608,15 +616,7 @@ if ($action == 'addcontainer')
if (! dol_is_file($filehtmlheader))
{
$htmlheadercontent ="\n";
- $htmlheadercontent.=''."\n";
- $htmlheadercontent.=''."\n";
-
- $htmlheadercontent.=''."\n";
- $htmlheadercontent.=''."\n";
-
- $htmlheadercontent.=''."\n";
-
- $htmlheadercontent.=''."\n";
+ $htmlheadercontent.=$htmlheadercontentdefault;
$htmlheadercontent.="";
$result=dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent);
}
@@ -1673,9 +1673,7 @@ if ($action == 'editcss')
if (! trim($htmlheadercontent))
{
$htmlheadercontent ="\n";
- $htmlheadercontent.=''."\n";
- $htmlheadercontent.=''."\n";
- $htmlheadercontent.=''."\n";
+ $htmlheadercontent.=$htmlheadercontentdefault;
$htmlheadercontent.="";
}
else
@@ -1755,17 +1753,7 @@ if ($action == 'editcss')
// Common HTML header
print ' | ';
$htmlhelp=$langs->trans("Example").' : ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous" ></script> ';
- $htmlhelp.='<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous" ></script> ';
- $htmlhelp.=' ';
- $htmlhelp.='<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" ></script> ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.13.0/umd/popper.min.js" ></script> ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js" ></script> ';
-
+ $htmlhelp.=dol_htmlentitiesbr($htmlheadercontentdefault);
print $form->textwithpicto($langs->trans('WEBSITE_HTML_HEADER'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print ' | ';
@@ -1993,16 +1981,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
$htmlhelp=$langs->trans("EditTheWebSiteForACommonHeader").'
';
$htmlhelp=$langs->trans("Example").' : ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous" ></script> ';
- $htmlhelp.='<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous" ></script> ';
- $htmlhelp.=' ';
- $htmlhelp.='<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" ></script> ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.13.0/umd/popper.min.js" ></script> ';
- $htmlhelp.=' ';
- $htmlhelp.='<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js" ></script> ';
+ $htmlhelp.=dol_htmlentitiesbr($htmlheadercontentdefault);
print $form->textwithpicto($langs->trans('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print ' | ';
|