Skip to content
Permalink
Browse files

Merge branch 't/14769' into major

  • Loading branch information...
Comandeer committed Feb 28, 2017
2 parents 2b6de50 + 9f77c1e commit f8e830b95dc6eb68e458f4269204331d07dc5648
@@ -20,6 +20,7 @@ Fixed Issues:
* [#10472](http://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](http://ckeditor.com/addon/tableresize) on table's header and footer.
* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: [Clipboard](http://ckeditor.com/addon/clipboard) plugin doesn't allow to drop widgets into editor.
* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: Editor scrolls to top after focusing or when a dialog is opened.
* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by [Autolink](http://ckeditor.com/addon/autolink) plugin.

## CKEditor 4.6.2

@@ -7,7 +7,7 @@
'use strict';

// Regex by Imme Emosol.
var validUrlRegex = /^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?[^\s\.,]$/ig,
var validUrlRegex = /^(https?|ftp):\/\/(-\.)?([^\s\/?\.#]+\.?)+(\/[^\s]*)?[^\s\.,]$/ig,
doubleQuoteRegex = /"/g;

CKEDITOR.plugins.add( 'autolink', {
@@ -78,7 +78,8 @@ bender.test( {
'https://placekitten.com/g/180/300',
'http://giphy.com/gifs/space-nasa-test-GDiDCTh9AjbiM',
'https://www.google.pl/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=ebay',
'http://www.legia.sport.pl/legia/1,139320,18079195.html#MTstream'
'http://www.legia.sport.pl/legia/1,139320,18079195.html#MTstream',
'http://a.b-c.de'
];

var pastedText;
@@ -165,4 +166,4 @@ bender.test( {

this.editor.execCommand( 'paste', pastedText );
}
} );
} );
@@ -0,0 +1,20 @@
<h3>URLs that should be turned into links</h3>

<p>http://google.com/one_two_three</p>
<p>http://google.com/one_two_three/</p>
<p>http://www.google.com/one_two_three#anchor</p>
<p>https://www.google.com/test/?one=scoobydoobydoo&two=scoobydooby1doo&asdfgh</p>
<p>http://a.b-c.de</p>

<h3>URLs that shouldn't be turned into links</h3>

<p>http://google.com/URL encoded spaces please/</p>
<p>h://notarealprotocol</p>

<textarea id="editor1" cols="10" rows="10">
<p>Foo bar.</p>
</textarea>

<script>
CKEDITOR.replace( 'editor1' );
</script>
@@ -0,0 +1,10 @@
@bender-ui: collapsed
@bender-tags: 4.7.0, tc, 14769
@bender-ckeditor-plugins: clipboard, toolbar, wysiwygarea, elementspath, link, autolink

## Test Scenario

Paste each URL to the editor and check whether it's turned into a link.


Make sure you copy the URLs without trailing spaces.

0 comments on commit f8e830b

Please sign in to comment.
You can’t perform that action at this time.