* Contains image-related functions.
*
* @author Marcel Werk
- * @copyright 2001-2017 WoltLab GmbH
+ * @copyright 2001-2018 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Util
*/
$content = str_replace('description', '', $content);
// search for javascript
- if (strstr($content, 'script') || strstr($content, 'javascript') || strstr($content, 'expression(')) return false;
+ if (strpos($content, 'script') !== false || strpos($content, 'javascript') !== false || strpos($content, 'expression(') !== false) return false;
return true;
}
}
}
else if ($handleSvgAsValidImage) {
- if (!in_array(FileUtil::getMimeType($location), ['image/svg', 'image/svg+xml']) && pathinfo($filename, PATHINFO_EXTENSION) === 'svg') {
+ if (in_array(FileUtil::getMimeType($location), ['image/svg', 'image/svg+xml']) && pathinfo($filename, PATHINFO_EXTENSION) === 'svg') {
return true;
}
}