From: garvinhicking Date: Mon, 16 Apr 2007 10:09:44 +0000 (+0000) Subject: * Fix redundant space when inserting links through the non-WYSIWYG X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=086bd1805142a3fc07a7459db805d97c64ae135e;p=s9y.git * Fix redundant space when inserting links through the non-WYSIWYG editor panel. Fix "null" insertion. Thanks to Alp Uckan. --- diff --git a/deployment/serendipity_editor.js b/deployment/serendipity_editor.js index 4ddf14c..ab70ec7 100644 --- a/deployment/serendipity_editor.js +++ b/deployment/serendipity_editor.js @@ -75,13 +75,13 @@ function wrapSelectionWithLink(txtarea) { var my_title = prompt("Enter title/tooltip:", ""); - html_title = ""; - if (my_title != "") { - html_title = ' title="' + my_title + '"'; + html_title = ""; + if (my_title != "" && my_title != null) { + html_title = ' title="' + my_title + '"'; } if (my_link != null) { - lft = ""; + lft = ""; if (my_desc != null && my_desc != "") { rgt = my_desc + ""; } else { @@ -143,12 +143,12 @@ function serendipity_insLink (area) { return; } - html_title = ""; - if (my_title != "") { - html_title = ' title="' + my_title + '"'; + html_title = ""; + if (my_title != "" && my_title != null) { + html_title = ' title="' + my_title + '"'; } - area.value = area.value + '' + (text ? text : loc) + ''; + area.value = area.value + '' + (text ? text : loc) + ''; area.focus(); } diff --git a/docs/NEWS b/docs/NEWS index 0fee63d..badb175 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.2 () ------------------------------------------------------------------------ + * Fix redundant space when inserting links through the non-WYSIWYG + editor panel. Fix "null" insertion. Thanks to Alp Uckan. + * Fix RSS fullfeed "let client decide" option typo. Previously this always enforced a fullfeed to show, regardless of what the client indicated. Thanks to stm9x9 (garvinhicking) diff --git a/serendipity_editor.js b/serendipity_editor.js index 4ddf14c..ab70ec7 100644 --- a/serendipity_editor.js +++ b/serendipity_editor.js @@ -75,13 +75,13 @@ function wrapSelectionWithLink(txtarea) { var my_title = prompt("Enter title/tooltip:", ""); - html_title = ""; - if (my_title != "") { - html_title = ' title="' + my_title + '"'; + html_title = ""; + if (my_title != "" && my_title != null) { + html_title = ' title="' + my_title + '"'; } if (my_link != null) { - lft = ""; + lft = ""; if (my_desc != null && my_desc != "") { rgt = my_desc + ""; } else { @@ -143,12 +143,12 @@ function serendipity_insLink (area) { return; } - html_title = ""; - if (my_title != "") { - html_title = ' title="' + my_title + '"'; + html_title = ""; + if (my_title != "" && my_title != null) { + html_title = ' title="' + my_title + '"'; } - area.value = area.value + '' + (text ? text : loc) + ''; + area.value = area.value + '' + (text ? text : loc) + ''; area.focus(); }