]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/themes/advanced/js/anchor.js
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / themes / advanced / js / anchor.js
index d7a854e9145447adc6f0bdf7aa0acdd51ca5c28c..7b556351df49d9064d6016dca78d80ad65a26a54 100644 (file)
@@ -19,6 +19,11 @@ var AnchorDialog = {
        update : function() {
                var ed = this.editor, elm, name = document.forms[0].anchorName.value;
 
+               if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
+                       tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
+                       return;
+               }
+
                tinyMCEPopup.restoreSelection();
 
                if (this.action != 'update')