GNOME Bugzilla – Bug 752895
lua-factory: Also try convert HTML from ISO8859-1
Last modified: 2015-07-27 12:23:52 UTC
.
Created attachment 308178 [details] [review] lua-factory: Also try convert HTML from ISO8859-1 The OKGoals source will try and download: http://www.okgoals.com/page-start_from_108.0_archive_.html which contains an ISO8859-1 accent, despite being declared as UTF-8. Try to convert from ISO8859-1 before giving up on the download content.
Review of attachment 308178 [details] [review]: Comments below ::: src/lua-factory/grl-lua-library.c @@ +456,3 @@ data = NULL; } else if (!g_utf8_validate(data, len, NULL)) { + char *fixed; gchar ? @@ +463,3 @@ + data = NULL; + } else { + data = fixed; You are leaking the `fixed` string here (data from grl_net_wc_request_finish doesn't need to be freed but from g_convert it does)
Comment on attachment 308178 [details] [review] lua-factory: Also try convert HTML from ISO8859-1 Pushed by accident.
Created attachment 308208 [details] [review] lua-factory: Fix memory leak fetching ISO8859-1 text Fix memory leak introduced in e064a170316e2a737d0625720b706e4c08bae6e6 when the text downloaded is actually in ISO8859-1 format.
Pushing leak fix. Attachment 308208 [details] pushed as 57b345f - lua-factory: Fix memory leak fetching ISO8859-1 text