Simplify is_html().

This commit is contained in:
tastytea 2019-12-11 17:16:06 +01:00
parent ab94a9e6b0
commit d4d7cd4efd
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 6 deletions

View File

@ -705,12 +705,7 @@ void URI::detect_encoding()
bool URI::is_html() const
{
const RegEx re_htmlfile(".*\\.(.?html?|xml|rss)$", RegEx::RE_CASELESS);
if (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri))
{
return true;
}
return false;
return (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri));
}
} // namespace remwharead