Browse Source

change strpos to stripos

main
ghost 2 years ago
parent
commit
9477d87b2e
  1. 20
      crontab/crawler.php

20
crontab/crawler.php

@ -260,7 +260,7 @@ try {
$mime = Filter::mime($mime); $mime = Filter::mime($mime);
// Check for DOM // Check for DOM
if (false !== strpos('text/html', $mime)) { if (false !== stripos('text/html', $mime)) {
$hostPageIsDom = true; $hostPageIsDom = true;
$hostPageInMime = true; $hostPageInMime = true;
@ -268,7 +268,7 @@ try {
} }
// Ban page on MIME type not allowed in settings // Ban page on MIME type not allowed in settings
if (false !== strpos(Filter::mime($contentType), $mime)) { if (false !== stripos(Filter::mime($contentType), $mime)) {
$hostPageInMime = true; $hostPageInMime = true;
break; break;
@ -406,7 +406,7 @@ try {
} }
// Skip encoded content // Skip encoded content
if (false !== strpos($src, 'data:')) { if (false !== stripos($src, 'data:')) {
continue; continue;
} }
@ -438,7 +438,7 @@ try {
} }
// Skip encoded content // Skip encoded content
if (false !== strpos($src, 'data:')) { if (false !== stripos($src, 'data:')) {
continue; continue;
} }
@ -468,7 +468,7 @@ try {
} }
// Skip encoded content // Skip encoded content
if (false !== strpos($src, 'data:')) { if (false !== stripos($src, 'data:')) {
continue; continue;
} }
@ -498,7 +498,7 @@ try {
} }
// Skip encoded content // Skip encoded content
if (false !== strpos($src, 'data:')) { if (false !== stripos($src, 'data:')) {
continue; continue;
} }
@ -529,25 +529,25 @@ try {
} }
// Skip anchor links // Skip anchor links
if (false !== strpos($href, '#')) { if (false !== stripos($href, '#')) {
continue; continue;
} }
// Skip javascript links // Skip javascript links
if (false !== strpos($href, 'javascript:')) { if (false !== stripos($href, 'javascript:')) {
continue; continue;
} }
// Skip mailto links // Skip mailto links
if (false !== strpos($href, 'mailto:')) { if (false !== stripos($href, 'mailto:')) {
continue; continue;
} }
// Skip x-raw-image links // Skip x-raw-image links
if (false !== strpos($href, 'x-raw-image:')) { if (false !== stripos($href, 'x-raw-image:')) {
continue; continue;
} }

Loading…
Cancel
Save