Skip to content

Commit

Permalink
Added meta charset=utf-8 to HTML pages
Browse files Browse the repository at this point in the history
  • Loading branch information
njh committed Mar 27, 2017
1 parent 9f333bd commit 7004d9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build-scripts/build-static.pl
Expand Up @@ -270,7 +270,10 @@
open(CREDITS, ">macosx/Credits.html") or die "Failed to write to credits file: $!";
print CREDITS "<!DOCTYPE html>\n";
print CREDITS "<html>\n";
print CREDITS "<head><title>RedStore Credits</title></head>\n";
print CREDITS "<head>\n";
print CREDITS " <meta charset=\"utf-8\" />\n";
print CREDITS " <title>RedStore Credits</title>\n";
print CREDITS "</head>\n";
print CREDITS "<body style='font-family: Tahoma, sans-serif; font-size: 8pt'>\n";
print CREDITS " <p>This version of RedStore uses following libraries:</p>\n";
print CREDITS " <ul>\n";
Expand Down
1 change: 1 addition & 0 deletions src/pages.c
Expand Up @@ -62,6 +62,7 @@ redhttp_response_t *redstore_page_new(int code, const char *title)
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n");
redstore_page_append_string(response, "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
redstore_page_append_string(response, "<head>\n");
redstore_page_append_string(response, " <meta charset=\"utf-8\" />\n");
redstore_page_append_strings(response, " <title>RedStore - ", title, "</title>\n", NULL);
redstore_page_append_string(response, "</head>\n");
redstore_page_append_string(response, "<body>\n");
Expand Down
2 changes: 1 addition & 1 deletion src/redhttp/response.c
Expand Up @@ -116,7 +116,7 @@ redhttp_response_t *redhttp_response_new_error_page(int code, const char *explan
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
"<head><title>%d %s</title></head>\n"
"<head><meta charset=\"utf-8\" /><title>%d %s</title></head>\n"
"<body>\n<h1>%d %s</h1>\n" "<p>%s</p>\n" "</body></html>\n";

assert(code >= 100 && code < 1000);
Expand Down

0 comments on commit 7004d9d

Please sign in to comment.