includes/clientside/tinymce/plugins/advlink/js/advlink.js
changeset 1193 e3b94bd055dc
parent 778 57ce13805b6f
--- a/includes/clientside/tinymce/plugins/advlink/js/advlink.js	Mon Dec 21 15:41:05 2009 -0500
+++ b/includes/clientside/tinymce/plugins/advlink/js/advlink.js	Tue Dec 22 13:09:59 2009 -0500
@@ -116,7 +116,7 @@
 	if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
 		n.value = 'mailto:' + n.value;
 
-	if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
+	if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
 		n.value = 'http://' + n.value;
 }
 
@@ -402,6 +402,7 @@
 
 	// Create new anchor elements
 	if (elm == null) {
+		inst.getDoc().execCommand("unlink", false, null);
 		tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
 
 		elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});