diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/web-view.c b/src/web-view.c index 31540b3..f7e410f 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -914,27 +914,31 @@ get_clean_title(MqWebView *web_view) static gboolean extension_is_html(const gchar *extension) { - return - extension[0] == 'h' && - extension[1] == 't' && - extension[2] == 'm' && - (extension[3] == '\0' || - (extension[3] == 'l' && - extension[4] == '\0')); + if (extension[0] == 'h' && extension[1] == 't' && extension[2] == 'm') { + if (extension[3] == '\0') { + return TRUE; + } else if (extension[3] == 'l' && extension[4] == '\0') { + return TRUE; + } + } + return FALSE; } static gboolean extension_is_mhtml(const gchar *extension) { - return - extension[0] == 'm' && - extension[1] == 'h' && - extension[2] == 't' && - (extension[3] == '\0' || - (extension[3] == 'm' && - (extension[4] == '\0' || - (extension[4] == 'l' && - extension[5] == '\0')))); + if (extension[0] == 'm' && extension[1] == 'h' && extension[2] == 't') { + if (extension[3] == '\0') { + return TRUE; + } else if (extension[3] == 'm') { + if (extension[3] == '\0') { + return TRUE; + } else if (extension[4] == 'l' && extension[5] == '\0'){ + return TRUE; + } + } + } + return FALSE; } static void |