Skip to content

Commit

Permalink
Merge branch 't/9661'
Browse files Browse the repository at this point in the history
  • Loading branch information
adelura committed May 8, 2014
2 parents 0f68337 + 9b11b6c commit d971319
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -4,6 +4,7 @@ CKEditor 4 Changelog
## CKEditor 4.4.1

Fixed Issues:
* [#9661](http://dev.ckeditor.com/ticket/9661): Added optional, configurable possibility to set JavaScript code in `href` attribute in anchor tags.
* [#11809](http://dev.ckeditor.com/ticket/11809): Set indentation to four spaces in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the title element.
* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin from required in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
Expand Down
2 changes: 1 addition & 1 deletion plugins/link/dialogs/link.js
Expand Up @@ -201,7 +201,7 @@
if ( dialog.getContentElement( 'info', 'linkType' ) && dialog.getValueOf( 'info', 'linkType' ) != 'url' )
return true;

if ( ( /javascript\:/ ).test( this.getValue() ) ) {
if ( !editor.config.linkJavaScriptLinksAllowed && ( /javascript\:/ ).test( this.getValue() ) ) {
alert( commonLang.invalidValue );
return false;
}
Expand Down
14 changes: 14 additions & 0 deletions plugins/link/plugin.js
Expand Up @@ -754,5 +754,19 @@
* @member CKEDITOR.config
*/
linkShowTargetTab: true

/**
* Whether JavaScript code is allowed as a `href` attribute in anchor tag.
* With this option enabled it is possible to create links like:
*
* <a href="javascript:alert('Hello world!')">hello world</a>
*
* By default JavaScript links are not allowed and will not pass
* the dialog validation.
*
* @since 4.4.1
* @cfg {Boolean} [linkJavaScriptLinksAllowed=false]
* @member CKEDITOR.config
*/
} );
} )();

0 comments on commit d971319

Please sign in to comment.