Merge pull request #1364 from marcosgdf/xss-title

Fixed XSS problem in title tag
This commit is contained in:
Laurent Destailleur 2014-01-09 06:32:35 -08:00
commit 433a6c0e76

View File

@ -968,8 +968,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
$appli='Dolibarr';
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
if ($title) print '<title>'.$appli.' - '.$title.'</title>';
else print "<title>".$appli."</title>";
if ($title) print '<title>'.dol_htmlentities($appli.' - '.$title).'</title>';
else print "<title>".dol_htmlentities($appli)."</title>";
print "\n";
if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax)