This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branches 't/github-rte/17' and 't/github-rte/93' into t/ckedito…
…r5/5988
- Loading branch information
Showing
4 changed files
with
115 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
import { testDataProcessor } from '../_utils/utils'; | ||
|
||
describe( 'GFMDataProcessor', () => { | ||
describe( 'text', () => { | ||
describe( 'urls', () => { | ||
it( 'should not escape urls', () => { | ||
testDataProcessor( | ||
'escape\\_this https://test.com/do_[not]-escape escape\\_this', | ||
'<p>escape_this https://test.com/do_[not]-escape escape_this</p>' | ||
); | ||
} ); | ||
|
||
it( 'should not escape urls (at start)', () => { | ||
testDataProcessor( | ||
'https://test.com/do_[not]-escape escape\\_this', | ||
'<p>https://test.com/do_[not]-escape escape_this</p>' | ||
); | ||
} ); | ||
|
||
it( 'should not escape urls (at end)', () => { | ||
testDataProcessor( | ||
'escape\\_this https://test.com/do_[not]-escape', | ||
'<p>escape_this https://test.com/do_[not]-escape</p>' | ||
); | ||
} ); | ||
|
||
[ | ||
'https://test.com/do_[not]-escape', | ||
'http://test.com/do_[not]-escape', | ||
'www.test.com/do_[not]-escape' | ||
].forEach( url => { | ||
it( `should not escape urls (${ url })`, () => { | ||
testDataProcessor( url, `<p>${ url }</p>` ); | ||
} ); | ||
} ); | ||
} ); | ||
} ); | ||
} ); |