diff --git a/head.sub.php b/head.sub.php
index fc658d1aa..dc5664636 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -45,7 +45,7 @@ if (G5_IS_MOBILE) {
echo ''.PHP_EOL;
} else {
echo ''.PHP_EOL;
- echo ''.PHP_EOL;
+ echo ''.PHP_EOL;
}
if($config['cf_add_meta'])
diff --git a/plugin/editor/cheditor5/popup/js/image.html5.js b/plugin/editor/cheditor5/popup/js/image.html5.js
index b4ed00b0e..fc97d6cd0 100644
--- a/plugin/editor/cheditor5/popup/js/image.html5.js
+++ b/plugin/editor/cheditor5/popup/js/image.html5.js
@@ -1064,7 +1064,11 @@ DoUpload.prototype = {
if (evt.target.readyState === FileReader.DONE) {
blob = new self.MyBlob(self.NewBlob(evt.target.result, filetype));
- orientation = self.getOrientation(evt.target.result.slice(0, 64 * 1024));
+ try {
+ orientation = self.getOrientation(evt.target.result.slice(0, 64 * 1024));
+ } catch(err) {
+
+ }
image = new Image();
image.onload = function () {