Filter the link href when inserting external image in the editor, props DrewAPicture, fixes #18445
git-svn-id: http://svn.automattic.com/wordpress/trunk@19275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4691284eb1
commit
e09e8f465c
|
@ -1497,8 +1497,10 @@ var addExtImage = {
|
|||
|
||||
html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />';
|
||||
|
||||
if ( f.url.value )
|
||||
html = '<a href="'+f.url.value+'">'+html+'</a>';
|
||||
if ( f.url.value ) {
|
||||
url = f.url.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
||||
html = '<a href="'+url+'">'+html+'</a>';
|
||||
}
|
||||
|
||||
if ( caption )
|
||||
html = '[caption id="" align="'+t.align+'" width="'+t.width+'" caption="'+caption+'"]'+html+'[/caption]';
|
||||
|
|
Loading…
Reference in New Issue