diff --git a/admin/editor-js.php b/admin/editor-js.php index 495ef0ae..1a356645 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -131,17 +131,24 @@ $(document).ready(function () { editor.hooks.chain('enterFakeFullScreen', function () { th = textarea.height(); $(document.body).addClass('fullscreen'); - textarea.css('height', $(window).height() - toolbar.outerHeight()); + var h = $(window).height() - toolbar.outerHeight(); + + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('enterFullScreen', function () { $(document.body).addClass('fullscreen'); - textarea.css('height', window.screen.height - toolbar.outerHeight()); + + var h = window.screen.height - toolbar.outerHeight(); + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('exitFullScreen', function () { $(document.body).removeClass('fullscreen'); textarea.height(th); + preview.css('height', 'auto'); }); editor.run(); diff --git a/admin/js/markdown.js b/admin/js/markdown.js index 8d669c5e..9e57430f 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -216,7 +216,7 @@ this.makeHtml = function(text) { text = _ExecuteExtension(x, text); }); - text = text.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|script|noscript|iframe|object|embed)[^>]*>/ig, function (all) { + text = text.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|noscript)[^>]*>/ig, function (all) { return all.replace(/&/g, '&') .replace(//g, '>') @@ -225,7 +225,7 @@ this.makeHtml = function(text) { return all; }); - if (text.indexOf('')) { + if (text.indexOf('') > 0) { var parts = text.split(/\s*<\!\-\-more\-\->\s*/), summary = parts.shift(), details = parts.join(''); @@ -4858,10 +4858,10 @@ else if (!chunk.selection) { if (isImage) { - chunk.selection = that.getString("imagename") || that.getString("imagedescription"); + chunk.selection = that.getString("imagename").replace('_', '\\_') || that.getString("imagedescription"); } else { - chunk.selection = that.getString("linkname") || that.getString("linkdescription"); + chunk.selection = that.getString("linkname").replace('_', '\\_') || that.getString("linkdescription"); } } } @@ -5307,7 +5307,7 @@ else commandProto.doMore = function (chunk, postProcessing) { chunk.startTag = "\n\n"; chunk.selection = ""; - chunk.skipLines(2, 1, true); + chunk.skipLines(2, 0, true); } commandProto.doTab = function (chunk, postProcessing) { diff --git a/admin/js/typecho.js b/admin/js/typecho.js index 8f848e6f..5ae22962 100644 --- a/admin/js/typecho.js +++ b/admin/js/typecho.js @@ -232,8 +232,9 @@ return true; } + file = file.toLowerCase(); for (var i = 0; i < s.types.length; i ++) { - var ext = s.types[i]; + var ext = s.types[i].toLowerCase(); if (file.length <= ext.length) { continue; diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 116d13c7..ec7c96eb 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -187,6 +187,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['status'] = 'publish'; } else { $contents['status'] = $contents['visibility']; + $contents['password'] = ''; } } else { $contents['status'] = 'waiting'; @@ -259,6 +260,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $contents['status'] = 'publish'; } else { $contents['status'] = $contents['visibility']; + $contents['password'] = ''; } } else { $contents['status'] = 'waiting';