]> git.mjollnir.org Git - s9y.git/commitdiff
* Fix redundant space when inserting links through the non-WYSIWYG
authorgarvinhicking <garvinhicking>
Mon, 16 Apr 2007 10:09:44 +0000 (10:09 +0000)
committergarvinhicking <garvinhicking>
Mon, 16 Apr 2007 10:09:44 +0000 (10:09 +0000)
      editor panel. Fix "null" insertion. Thanks to Alp Uckan.

deployment/serendipity_editor.js
docs/NEWS
serendipity_editor.js

index 4ddf14cc0637198a8bc261be42c33692328703ee..ab70ec7be56d5582204644f16c41f9559494d908 100644 (file)
@@ -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 = "<a href=\"" + my_link + "\" " + html_title + ">";
+        lft = "<a href=\"" + my_link + "\"" + html_title + ">";
         if (my_desc != null && my_desc != "") {
             rgt = my_desc + "</a>";
         } 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 + '<a href="' + loc + '" ' + html_title + '>' + (text ? text : loc) + '</a>';
+    area.value = area.value + '<a href="' + loc + '"' + html_title + '>' + (text ? text : loc) + '</a>';
     area.focus();
 }
 
index 0fee63d3fa6972f95c814a694da37a9f2138420a..badb1755171a75b09bcd44bc55d14a7891848ec6 100644 (file)
--- 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)
index 4ddf14cc0637198a8bc261be42c33692328703ee..ab70ec7be56d5582204644f16c41f9559494d908 100644 (file)
@@ -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 = "<a href=\"" + my_link + "\" " + html_title + ">";
+        lft = "<a href=\"" + my_link + "\"" + html_title + ">";
         if (my_desc != null && my_desc != "") {
             rgt = my_desc + "</a>";
         } 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 + '<a href="' + loc + '" ' + html_title + '>' + (text ? text : loc) + '</a>';
+    area.value = area.value + '<a href="' + loc + '"' + html_title + '>' + (text ? text : loc) + '</a>';
     area.focus();
 }