From 11fcb0f86dc6fe78d499be7f869bb31a87a5911c Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 14 Aug 2026 11:19:02 -1000 Subject: Drop the XHTML slashes and boolean spellings --- source/html.c | 8 ++++---- source/ui-commit.c | 4 ++-- source/ui-diff.c | 14 +++++++------- source/ui-shared.c | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'source') diff --git a/source/html.c b/source/html.c index f69f109..ae8acd6 100644 --- a/source/html.c +++ b/source/html.c @@ -323,7 +323,7 @@ void html_hidden(const char *name, const char *value) html_attr(name); html("' value='"); html_attr(value); - html("'/>"); + html("'>"); } void html_option(const char *value, const char *text, @@ -333,7 +333,7 @@ void html_option(const char *value, const char *text, html_attr(value); html("'"); if (selected_value && !strcmp(selected_value, value)) - html(" selected='selected'"); + html(" selected"); html(">"); html_txt(text); html("\n"); @@ -342,9 +342,9 @@ void html_option(const char *value, const char *text, void html_intoption(int value, const char *text, int selected_value) { htmlf(""); + html("\n"); } void html_link_open(const char *url, const char *title, const char *class) diff --git a/source/ui-commit.c b/source/ui-commit.c index f9051c1..d3ba703 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -143,8 +143,8 @@ void cgit_print_commit(char *hex, const char *prefix) if (ctx.repo->snapshots) { html("download"); - cgit_print_snapshot_links(ctx.repo, hex, "
"); - html(""); + cgit_print_snapshot_links(ctx.repo, hex, "
"); + html("\n"); } html("\n"); diff --git a/source/ui-diff.c b/source/ui-diff.c index 6b6b30f..98bccfe 100644 --- a/source/ui-diff.c +++ b/source/ui-diff.c @@ -246,15 +246,15 @@ static void print_file_header(const struct object_id *old_oid, char *old_path, html_txt(new_path); if (old_mode == 0) - htmlf("
new file mode %.6o", new_mode); + htmlf("
new file mode %.6o", new_mode); if (new_mode == 0) - htmlf("
deleted file mode %.6o", old_mode); + htmlf("
deleted file mode %.6o", old_mode); if (!subproject) { old_abbrev = abbrev_oid(old_oid); new_abbrev = abbrev_oid(new_oid); - htmlf("
index %s..%s", old_abbrev, new_abbrev); + htmlf("
index %s..%s", old_abbrev, new_abbrev); free(old_abbrev); free(new_abbrev); if (old_mode != 0 && new_mode != 0) { @@ -264,9 +264,9 @@ static void print_file_header(const struct object_id *old_oid, char *old_path, } if (is_null_oid(old_oid)) { old_path = "dev/null"; - html("
--- /"); + html("
--- /"); } else - html("
--- a/"); + html("
--- a/"); if (old_mode != 0) cgit_tree_link(old_path, NULL, NULL, ctx.qry.head, oid_to_hex(old_rev_oid), old_path); @@ -274,9 +274,9 @@ static void print_file_header(const struct object_id *old_oid, char *old_path, html_txt(old_path); if (is_null_oid(new_oid)) { new_path = "dev/null"; - html("
+++ /"); + html("
+++ /"); } else - html("
+++ b/"); + html("
+++ b/"); if (new_mode != 0) cgit_tree_link(new_path, NULL, NULL, ctx.qry.head, oid_to_hex(new_rev_oid), new_path); diff --git a/source/ui-shared.c b/source/ui-shared.c index b776a60..7a2255e 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -412,7 +412,7 @@ static void print_header(void) html_attr(root_url()); html("'>cgit logo\n"); + html("' alt='cgit logo'>\n"); } html("

"); @@ -437,7 +437,7 @@ static void print_header(void) refs_for_each_remote_ref(get_main_ref_store(the_repository), print_branch_option, &branch_count); html(" "); - html(""); + html(""); html("\n"); } @@ -546,8 +546,8 @@ static void print_repo_search(void) html("\n"); html("\n"); - html("\n"); + html("'>\n"); + html("\n"); html("\n"); } @@ -575,8 +575,8 @@ static void print_site_search(void) html("'>\n"); html("\n"); - html("\n"); + html("'>\n"); + html("\n"); html("\n"); free(currenturl); } -- cgit v2.8.0