mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Strip tags and convert < > to entities when appending widget title, fixes #9830
git-svn-id: https://develop.svn.wordpress.org/trunk@11349 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -158,8 +158,10 @@ wpWidgets = {
|
||||
|
||||
appendTitle : function(widget) {
|
||||
$('input[type="text"]', widget).each(function(){
|
||||
if ( this.id.indexOf('title') != -1 && $(this).val() ) {
|
||||
$('.widget-title .in-widget-title', widget).html(': ' + $(this).val());
|
||||
var title;
|
||||
if ( this.id.indexOf('title') != -1 ) {
|
||||
title = $(this).val().replace(/<[^<>]+>/g, '').replace(/</g, '<').replace(/>/g, '>');
|
||||
$('.widget-title .in-widget-title', widget).html(': ' + title);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user