Merge branch 'jy/gitweb-xhtml5'
Update the doctype written in gitweb output to xhtml5. * jy/gitweb-xhtml5: gitweb: switch to an XHTML5 DOCTYPE
This commit is contained in:
commit
28c2a35997
@ -4219,7 +4219,10 @@ sub git_header_html {
|
||||
my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
|
||||
print <<EOF;
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY nbsp " ">
|
||||
<!ENTITY sdot "⋅">
|
||||
]>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
|
||||
<!-- git web interface version $version, (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->
|
||||
<!-- git core binaries version $git_version -->
|
||||
|
@ -220,4 +220,18 @@ test_expect_success 'no http-equiv="content-type" in XHTML' '
|
||||
no_http_equiv_content_type "p=.git;a=tree"
|
||||
'
|
||||
|
||||
proper_doctype() {
|
||||
gitweb_run "$@" &&
|
||||
grep -F "<!DOCTYPE html [" gitweb.body &&
|
||||
grep "<!ENTITY nbsp" gitweb.body &&
|
||||
grep "<!ENTITY sdot" gitweb.body
|
||||
}
|
||||
|
||||
test_expect_success 'Proper DOCTYPE with entity declarations' '
|
||||
proper_doctype &&
|
||||
proper_doctype "p=.git" &&
|
||||
proper_doctype "p=.git;a=log" &&
|
||||
proper_doctype "p=.git;a=tree"
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user