Simplify is_html().
This commit is contained in:
parent
ab94a9e6b0
commit
d4d7cd4efd
|
@ -705,12 +705,7 @@ void URI::detect_encoding()
|
||||||
bool URI::is_html() const
|
bool URI::is_html() const
|
||||||
{
|
{
|
||||||
const RegEx re_htmlfile(".*\\.(.?html?|xml|rss)$", RegEx::RE_CASELESS);
|
const RegEx re_htmlfile(".*\\.(.?html?|xml|rss)$", RegEx::RE_CASELESS);
|
||||||
if (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri))
|
return (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri));
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace remwharead
|
} // namespace remwharead
|
||||||
|
|
Loading…
Reference in New Issue