editor panel. Fix "null" insertion. Thanks to Alp Uckan.
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 {
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();
}
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)
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 {
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();
}