JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.6.1
[ckeditor.git] / _source / plugins / link / dialogs / anchor.js
index 1e5b0ae..2611c8c 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -25,9 +25,10 @@ CKEDITOR.dialog.add( 'anchor', function( editor )
                minHeight : 60,\r
                onOk : function()\r
                {\r
-                       var name = this.getValueOf( 'info', 'txtName' );\r
+                       var name = CKEDITOR.tools.trim( this.getValueOf( 'info', 'txtName' ) );\r
                        var attributes =\r
                        {\r
+                               id : name,\r
                                name : name,\r
                                'data-cke-saved-name' : name\r
                        };\r