From 086bd1805142a3fc07a7459db805d97c64ae135e Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 16 Apr 2007 10:09:44 +0000 Subject: [PATCH] * Fix redundant space when inserting links through the non-WYSIWYG editor panel. Fix "null" insertion. Thanks to Alp Uckan. --- deployment/serendipity_editor.js | 16 ++++++++-------- docs/NEWS | 3 +++ serendipity_editor.js | 16 ++++++++-------- 3 files changed, 19 insertions(+), 16 deletions(-) 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(); } -- 2.39.5