From c5b2d8552c19025bc5c6629898b1ab7521316cc0 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 25 Aug 2015 23:11:21 +0200 Subject: [PATCH] Calendar: Make use of escapeSelector method --- ui/widgets/calendar.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ui/widgets/calendar.js b/ui/widgets/calendar.js index 5952a184f..709622e8a 100644 --- a/ui/widgets/calendar.js +++ b/ui/widgets/calendar.js @@ -29,7 +29,8 @@ "../version", "../keycode", "../unique-id", - "../tabbable" + "../tabbable", + "../escape-selector" ], factory ); } else { @@ -170,7 +171,7 @@ return $.widget( "ui.calendar", { // Check if the needed day is already present in our grid due // to eachDay option changes (eg. other-months demo) return !this.grid.find( - this._sanitizeSelector( "#" + this._getDayId( this.date ) ) + "#" + $.ui.escapeSelector( this._getDayId( this.date ) ) ).length; } @@ -186,7 +187,7 @@ return $.widget( "ui.calendar", { .removeClass( "ui-state-focus" ); this.activeDescendant = this.grid.find( - this._sanitizeSelector( "#" + id ) + " > button" + "#" + $.ui.escapeSelector( id ) + " > button" ).addClass( "ui-state-focus" ); }, @@ -545,10 +546,6 @@ return $.widget( "ui.calendar", { return $( "" ).text( this.labels[ key ] ).html(); }, - _sanitizeSelector: function( hash ) { - return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; - }, - _setHiddenPicker: function() { this.element.attr( { "aria-hidden": "true", -- 2.39.5