mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
WP_Link: convert < > and " to HTML entities when setting link title for the Text editor. Fixes #25704.
Built from https://develop.svn.wordpress.org/trunk@27071 git-svn-id: http://core.svn.wordpress.org/trunk@26944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4e5457ee1
commit
28cd7371c4
@ -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 + '"';
|
||||
|
||||
|
2
wp-includes/js/wplink.min.js
vendored
2
wp-includes/js/wplink.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user