Make WordPress Core

Changeset 19275


Ignore:
Timestamp:
11/14/2011 07:35:32 PM (13 years ago)
Author:
azaozz
Message:

Filter the link href when inserting external image in the editor, props DrewAPicture, fixes #18445

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r19268 r19275  
    14981498        html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />';
    14991499
    1500         if ( f.url.value )
    1501             html = '<a href="'+f.url.value+'">'+html+'</a>';
     1500        if ( f.url.value ) {
     1501            url = f.url.value.replace(/'/g, '&#039;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
     1502            html = '<a href="'+url+'">'+html+'</a>';
     1503        }
    15021504
    15031505        if ( caption )
Note: See TracChangeset for help on using the changeset viewer.