Comment 4 for bug 700004

Revision history for this message
Arnaud Renevier (arenevier) wrote :

I can reproduce the bug. As far as I undestand, it happens because urls may contain non utf8 characters (encoded). Unfortunately, midori treats them as utf-8, and at some point, it crashes (when calling g_markup_escape_text actually). A fix could for example, store the encoding of a page when storing it's its uri, so it can be converted from that encoding to utf-8.

Here is a quick and dirty fix that does not unescape uri, when unescaped uri is not valid utf-8. It's not ideal (because for non utf-8 charsets, it would not unescape, or it could even escape in a wrong way), but it least, it prevents midori from crashing.