Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
fix bug 777216 - remove spaces from URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Jul 25, 2012
1 parent c0a0ecb commit 7635254
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion media/ckeditor/plugins/mdn-link/dialogs/link.js
Expand Up @@ -1022,7 +1022,11 @@ CKEDITOR.dialog.add( 'link', function( editor )
url.indexOf('#') === 0 || // ex: "someAnchor"
url.indexOf('//') > -1; // ex: "http://mozilla.com" or "https://mozilla.com"

attributes[ 'data-cke-saved-href' ] = attributes.title = useOriginal ? url : 'http://' + url;
// Replace spaces in links
url = url.replace(/ /g, '_');

// Set the link to be used
attributes[ 'data-cke-saved-href' ] = attributes.title = (useOriginal ? url : 'http://' + url);

break;
case 'anchor':
Expand Down

0 comments on commit 7635254

Please sign in to comment.