Filter the link href when inserting external image in the editor, props DrewAPicture, fixes #18445
git-svn-id: https://develop.svn.wordpress.org/trunk@19275 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1cbf9eb415
commit
9cc4fac7fa
@ -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…
x
Reference in New Issue
Block a user