Skip to content

Commit 5aea655

Browse files
committed
Tests: Added test for autoembed where autolink escapes double quotes in URL.
1 parent 361e26a commit 5aea655

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/plugins/autoembed/autoembed.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,23 @@ bender.test( {
134134
} );
135135
},
136136

137+
// #13420, #13419
138+
'test link with double quotes': function() {
139+
var bot = this.editorBot;
140+
141+
var pastedText = 'https://foo.bar?a="b"';
142+
var expected = '<div data-oembed-url="https://foo.bar?a=%22b%22"><img src="https://foo.bar?a=%22b%22" /></div>';
143+
144+
bot.setData( '', function() {
145+
bot.editor.focus();
146+
this.editor.execCommand( 'paste', pastedText );
147+
148+
wait( function() {
149+
assert.areSame( expected, bot.getData( 1 ), 'Link with double quotes characters is embedded.' );
150+
}, 200 );
151+
} );
152+
},
153+
137154
'test uppercase link is auto embedded': function() {
138155
var pastedText = '<A href="https://foo.bar/bom">https://foo.bar/bom</A>',
139156
expected = /^<a data-cke-autoembed="\d+" href="https:\/\/foo.bar\/bom">https:\/\/foo.bar\/bom<\/a>$/;

0 commit comments

Comments
 (0)