make the page valid and keep chromium happy

This commit is contained in:
Christian Weiske 2010-10-09 12:09:39 +02:00
parent 48cd84921f
commit f359fd685f
3 changed files with 9 additions and 5 deletions

View file

@ -32,7 +32,7 @@ if ($editingMode) {
?> ?>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery-1.4.2.js"></script> <script type="text/javascript" src="<?php echo ROOT ?>js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery.jstree.js"></script> <script type="text/javascript" src="<?php echo ROOT ?>js/jquery.jstree.js"></script>
<script type="text/javascript"> <script type="text/javascript"><![CDATA[
jQuery("#related") jQuery("#related")
.jstree({ .jstree({
"themes" : { "themes" : {
@ -48,7 +48,7 @@ jQuery("#related")
parent = ""; parent = "";
if (node == -1 ) { if (node == -1 ) {
node = <?php echo json_encode($currenttag); ?>; node = <?php echo json_encode($currenttag); ?>;
parent = "&amp;parent=true"; parent = "&parent=true";
} else if (node.attr('rel')) { } else if (node.attr('rel')) {
node = node.attr('rel'); node = node.attr('rel');
} else { } else {
@ -60,5 +60,5 @@ jQuery("#related")
}, },
plugins : [ "themes", "json_data"] plugins : [ "themes", "json_data"]
}); });
</script> ]]></script>
</div> </div>

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' » ' . $pagetitle : '')); ?></title> <title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' » ' . $pagetitle : '')); ?></title>
<link rel="icon" type="image/png" href="<?php echo ROOT ?>icon.png" /> <link rel="icon" type="image/png" href="<?php echo ROOT ?>icon.png" />
<link rel="stylesheet" type="text/css" href="<?php echo ROOT ?>scuttle.css" /> <link rel="stylesheet" type="text/css" href="<?php echo ROOT ?>scuttle.css" />

View file

@ -120,7 +120,10 @@ $tplVars['userservice'] = $userservice;
if (!defined('UNIT_TEST_MODE')) { if (!defined('UNIT_TEST_MODE')) {
//API files define that, so we need a way to support both of them //API files define that, so we need a way to support both of them
if (!isset($httpContentType)) { if (!isset($httpContentType)) {
$httpContentType = 'text/html'; //$httpContentType = 'text/html';
//using that mime type makes all javascript nice in Chromium
// it also serves as test base if the pages really validate
$httpContentType = 'application/xhtml+xml';
} }
if ($httpContentType !== false) { if ($httpContentType !== false) {
header('Content-Type: ' . $httpContentType . '; charset=utf-8'); header('Content-Type: ' . $httpContentType . '; charset=utf-8');