Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sourcefiles/modern/plugins/jquery/jquery-ui-1.12.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -8847,7 +8847,12 @@ $.extend( Datepicker.prototype, {
var altFormat, date, dateStr,
altField = this._get( inst, "altField" );

if ( altField ) { // update alternate field too
// Mitigation for potential XSS: only allow altField as a selector, not as HTML
if (
typeof altField === "string" &&
altField.length > 0 &&
altField.trim().charAt(0) !== "<"
) { // update alternate field too
altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
date = this._getDate( inst );
dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
Expand Down