diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index c1070ce325c..ebfceab89d9 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -29,14 +29,15 @@ * @param Website $website Web site object * @param string $content Content to replace * @param int $removephppart 0=Replace PHP sections with a PHP badge. 1=Remove completely PHP sections. + * @param string $contenttype Content type * @return boolean True if OK * @see dolWebsiteOutput() for function used to replace content in a web server context */ -function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0) +function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $contenttype='html') { $nbrep = 0; - dol_syslog('dolWebsiteReplacementOfLinks start', LOG_DEBUG); + dol_syslog('dolWebsiteReplacementOfLinks start (contenttype='.$contenttype." USEDOLIBARRSERVER=".(defined('USEDOLIBARRSERVER')?'1':'')." USEDOLIBARREDITOR=".(defined('USEDOLIBARREDITOR')?'1':'').')', LOG_DEBUG); // Replace php code. Note $content may come from database and does not contains body tags. $replacewith='...php...'; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 7caf5a8aac4..35b5444e0b2 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3154,7 +3154,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa }*/ $out.="\n
\n"; $out.="\n"; - $out.=dolWebsiteReplacementOfLinks($object, $objectpage->htmlheader, 1); + $out.=dolWebsiteReplacementOfLinks($object, $objectpage->htmlheader, 1, 'htmlheader'); $out.="\n"; $out.="\n"; @@ -3172,7 +3172,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa include $filecss; $csscontent = ob_get_contents(); ob_end_clean(); - $tmpout.= dolWebsiteReplacementOfLinks($object, $csscontent, 1); + $tmpout.= dolWebsiteReplacementOfLinks($object, $csscontent, 1, 'css'); $tmpout.= '/* Include style from the HTML header of page */'."\n"; // Clean the html header of page to get only )', $objectpage->htmlheader);