From 3ff1ce47bc9e512ae67b009296c8ac7a6654c9ad Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 23 Feb 2018 20:34:06 +0100 Subject: Ignore the case while checking DOCTYPE during the file import Fixes #1091 --- application/NetscapeBookmarkUtils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/NetscapeBookmarkUtils.php') diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php index dd7057f8..2aa2da3b 100644 --- a/application/NetscapeBookmarkUtils.php +++ b/application/NetscapeBookmarkUtils.php @@ -108,7 +108,7 @@ class NetscapeBookmarkUtils $filesize = $files['filetoupload']['size']; $data = file_get_contents($files['filetoupload']['tmp_name']); - if (strpos($data, '') === false) { + if (preg_match('//i', $data) === 0) { return self::importStatus($filename, $filesize); } @@ -160,7 +160,7 @@ class NetscapeBookmarkUtils } else if ($post['privacy'] == 'public') { // all imported links are public $private = 0; - } + } $newLink = array( 'title' => $bkm['title'], -- cgit v1.2.3