mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 00:11:28 +00:00
add unit tests for url_is_html and fix a bug with UPPERCASE <HTML> in it
This commit is contained in:
committed by
Andrew Dolgov
parent
444537736b
commit
24eb4c780f
@@ -6961,8 +6961,8 @@
|
||||
*/
|
||||
function url_is_html($url) {
|
||||
$content = substr(fetch_file_contents($url, false), 0, 1000);
|
||||
if (strpos($content, '<html>') === false
|
||||
&& strpos($content, '<html ') === false
|
||||
if (stripos($content, '<html>') === false
|
||||
&& stripos($content, '<html ') === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user