From 943fd02769d4d3fc8daab64cfcd7cc2c967f75ef Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Tue, 8 Mar 2022 10:56:11 -0500 Subject: comment: fix typo Signed-off-by: Jason Yundt Signed-off-by: Junio C Hamano --- t/t9502-gitweb-standalone-parse-output.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh index 3167473b30..e7363511dd 100755 --- a/t/t9502-gitweb-standalone-parse-output.sh +++ b/t/t9502-gitweb-standalone-parse-output.sh @@ -34,7 +34,7 @@ EOF # # This will check that gitweb HTTP header contains proposed filename # as with '.tar' suffix added, and that generated tarfile -# (gitweb message body) has as prefix for al files in tarfile +# (gitweb message body) has as prefix for all files in tarfile # # default to check_snapshot () { -- cgit v1.2.3 From a262585d813482c06bf121ad41377f29eadd2bc1 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Tue, 8 Mar 2022 10:56:12 -0500 Subject: gitweb: remove invalid http-equiv="content-type" Before this change, gitweb would generate pages which included: When a meta's http-equiv equals "content-type", the http-equiv is said to be in the "Encoding declaration state". According to the HTML Standard, The Encoding declaration state may be used in HTML documents, but elements with an http-equiv attribute in that state must not be used in XML documents. Source: This change removes that meta element since gitweb always generates XML documents. Signed-off-by: Jason Yundt Signed-off-by: Junio C Hamano --- t/t9502-gitweb-standalone-parse-output.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't') diff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh index e7363511dd..8cb582f0e6 100755 --- a/t/t9502-gitweb-standalone-parse-output.sh +++ b/t/t9502-gitweb-standalone-parse-output.sh @@ -207,4 +207,17 @@ test_expect_success 'xss checks' ' xss "" "$TAG+" ' +no_http_equiv_content_type() { + gitweb_run "$@" && + ! grep -E "http-equiv=['\"]?content-type" gitweb.body +} + +# See: +test_expect_success 'no http-equiv="content-type" in XHTML' ' + no_http_equiv_content_type && + no_http_equiv_content_type "p=.git" && + no_http_equiv_content_type "p=.git;a=log" && + no_http_equiv_content_type "p=.git;a=tree" +' + test_done -- cgit v1.2.3