WP_Link: convert < > and " to HTML entities when setting link title for the Text editor. Fixes #25704.
git-svn-id: https://develop.svn.wordpress.org/trunk@27071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d58d7e8158
commit
bb49691c63
|
@ -165,7 +165,7 @@ var wpLink;
|
|||
},
|
||||
|
||||
htmlUpdate: function() {
|
||||
var attrs, html, begin, end, cursor,
|
||||
var attrs, html, begin, end, cursor, title,
|
||||
textarea = wpLink.textarea;
|
||||
|
||||
if ( ! textarea )
|
||||
|
@ -181,7 +181,8 @@ var wpLink;
|
|||
html = '<a href="' + attrs.href + '"';
|
||||
|
||||
if ( attrs.title )
|
||||
html += ' title="' + attrs.title + '"';
|
||||
title = attrs.title.replace( /</g, '<' ).replace( />/g, '>' ).replace( /"/g, '"' );
|
||||
html += ' title="' + title + '"';
|
||||
if ( attrs.target )
|
||||
html += ' target="' + attrs.target + '"';
|
||||
|
||||
|
|
Loading…
Reference in New Issue