diff options
author | jim-p <jimp@pfsense.org> | 2015-12-21 10:15:30 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-12-21 10:15:30 -0500 |
commit | 4fa888b46cbd7816b9063de2a06f249105457111 (patch) | |
tree | 01c2430e29483c8055e434ce405c8dcc64e8cdfd /usr/local/www/head.inc | |
parent | 49e83995cef02354b39a506a3bc0feb469cb5637 (diff) | |
download | pfsense-4fa888b46cbd7816b9063de2a06f249105457111.zip pfsense-4fa888b46cbd7816b9063de2a06f249105457111.tar.gz |
Encode hostname before printing; remove some related dead code.
Diffstat (limited to 'usr/local/www/head.inc')
-rwxr-xr-x | usr/local/www/head.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index 9535de3..0fb23e2 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -7,10 +7,11 @@ $g['theme'] = get_current_theme(); $pagetitle = gentitle( $pgtitle ); -if (isset($config['system']['webgui']['pagenamefirst'])) - $tabtitle = $pagetitle . " - " . $config['system']['hostname'] . "." . $config['system']['domain']; -else - $tabtitle = $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle; +if (isset($config['system']['webgui']['pagenamefirst'])) { + $tabtitle = $pagetitle . " - " . htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']); +} else { + $tabtitle = htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']) . " - " . $pagetitle; +} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |