diff options
author | crvi <crvisqr@gmail.com> | 2021-03-04 16:54:46 +0530 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-03-04 15:54:08 +0100 |
commit | d7e724a409b0df09bf7d677169af898aa98e6d9f (patch) | |
tree | d1af7b94d412be51bc7dc4d0669fda55d7ed6329 | |
parent | 1ba7e65db1d0a195111eba048895f9cb7d38254d (diff) | |
download | totem-pl-parser-d7e724a409b0df09bf7d677169af898aa98e6d9f.tar.gz |
plparser: Ignore case for UTF-8 encoding check in XML documents
Don't try to convert from "utf-8" to "UTF-8", as encodings aren't
case sensitive.
Encodings are defined in:
https://www.iana.org/assignments/character-sets/character-sets.xhtml
-rw-r--r-- | plparse/totem-pl-parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c index 1918360..a1bec2b 100644 --- a/plparse/totem-pl-parser.c +++ b/plparse/totem-pl-parser.c @@ -1874,7 +1874,7 @@ totem_pl_parser_parse_xml_relaxed (char *contents, break; } - if (encoding == NULL || g_str_equal (encoding, "UTF-8") != FALSE) + if (encoding == NULL || g_ascii_strcasecmp (encoding, "UTF-8") == 0) return doc; xml_parser_free_tree (doc); |