1
0
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:
Christian Weiske
2010-11-10 22:48:16 +01:00
committed by Andrew Dolgov
parent 444537736b
commit 24eb4c780f
2 changed files with 123 additions and 2 deletions

View File

@@ -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;
}