aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/NetscapeBookmarkUtils.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-02-24 13:29:11 +0100
committerGitHub <noreply@github.com>2018-02-24 13:29:11 +0100
commitbc4a0a672ca2c653b79b5ada1713aa1a128bf62a (patch)
tree5d81e2edb9a4b29593ebea05687fcddf3aa7c993 /application/NetscapeBookmarkUtils.php
parente746c237cdff932cf4c6510becc185c149fa4592 (diff)
parent3ff1ce47bc9e512ae67b009296c8ac7a6654c9ad (diff)
downloadShaarli-bc4a0a672ca2c653b79b5ada1713aa1a128bf62a.tar.gz
Shaarli-bc4a0a672ca2c653b79b5ada1713aa1a128bf62a.tar.zst
Shaarli-bc4a0a672ca2c653b79b5ada1713aa1a128bf62a.zip
Merge pull request #1092 from ArthurHoaro/fix/scuttle-doctype-case
Ignore the case while checking DOCTYPE during the file import
Diffstat (limited to 'application/NetscapeBookmarkUtils.php')
-rw-r--r--application/NetscapeBookmarkUtils.php4
1 files changed, 2 insertions, 2 deletions
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
108 $filesize = $files['filetoupload']['size']; 108 $filesize = $files['filetoupload']['size'];
109 $data = file_get_contents($files['filetoupload']['tmp_name']); 109 $data = file_get_contents($files['filetoupload']['tmp_name']);
110 110
111 if (strpos($data, '<!DOCTYPE NETSCAPE-Bookmark-file-1>') === false) { 111 if (preg_match('/<!DOCTYPE NETSCAPE-Bookmark-file-1>/i', $data) === 0) {
112 return self::importStatus($filename, $filesize); 112 return self::importStatus($filename, $filesize);
113 } 113 }
114 114
@@ -160,7 +160,7 @@ class NetscapeBookmarkUtils
160 } else if ($post['privacy'] == 'public') { 160 } else if ($post['privacy'] == 'public') {
161 // all imported links are public 161 // all imported links are public
162 $private = 0; 162 $private = 0;
163 } 163 }
164 164
165 $newLink = array( 165 $newLink = array(
166 'title' => $bkm['title'], 166 'title' => $bkm['title'],