Make WordPress Core

Changeset 27071


Ignore:
Timestamp:
02/02/2014 09:11:24 PM (13 years ago)
Author:
azaozz
Message:

WP_Link: convert < > and " to HTML entities when setting link title for the Text editor. Fixes #25704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wplink.js

    r26876 r27071  
    166166
    167167                htmlUpdate: function() {
    168                         var attrs, html, begin, end, cursor,
     168                        var attrs, html, begin, end, cursor, title,
    169169                                textarea = wpLink.textarea;
    170170
     
    182182
    183183                        if ( attrs.title )
    184                                 html += ' title="' + attrs.title + '"';
     184                                title = attrs.title.replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' );
     185                                html += ' title="' + title + '"';
    185186                        if ( attrs.target )
    186187                                html += ' target="' + attrs.target + '"';
Note: See TracChangeset for help on using the changeset viewer.