GNOME Bugzilla – Bug 728436
[PATCH] Write meta charset tag instead of meta http-equiv content-type
Last modified: 2021-07-05 13:21:34 UTC
Created attachment 274621 [details] The patch file, an example program and an example html file. I made a patch for writing HTML files with a meta charset tag instead of meta http-equiv content-type tag. Attachment contains the patch for libxml2-2.9.1, an example program to read and write a HTML file, and an example input html file. Without this patch, if you read a html with a meta charset tag and save it, you got both meta http-equiv tag and meta charset tag. Input example1.html --- <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>HTML5 example</title> </head> <body> <h1>HTML5 save example</h1> <p>I would like to meta charset tag is used instead of meta http-equiv.</p> </body> </html> --- Output example1-out.html WITHOUT this patch. --- <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>HTML5 example</title> </head> <body> <h1>HTML5 save example</h1> <p>I would like to meta charset tag is used instead of meta http-equiv.</p> </body> </html> --- Output example1-out.html WITH this patch. --- <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>HTML5 example</title> </head> <body> <h1>HTML5 save example</h1> <p>I would like to meta charset tag is used instead of meta http-equiv.</p> </body> </html> --- Could you review this patch and merge it? Thanks.
Ah, I didn't know I don't need to escape less-than sign '<'. Please read example with replacing < with <. Thanks.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.