Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1949 closed bug (fixed)

UI's popup calendar contains HTML entities

Reported by: pytechd Owned by:
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Description

By default, the popup calendar cannot be used in XML pages delivered as application/xhtml+xml under Firefox 2.0 or 3.0. The problem is that the HTML fragment inserted contains HTML entities, which don't work in innerHTML. The calendar throws an "Invalid Entity" exception.

Fortunately, it's an easy fix, backwards compatible, and compatible with any browser that jQuery supports.

Index: ui.cal.js
===================================================================
--- ui.cal.js	(revision 1244)
+++ ui.cal.js	(working copy)
@@ -25,8 +25,8 @@
 	this.regional[''] = { // Default regional settings
 		clearText: 'Clear', // Display text for clear link
 		closeText: 'Close', // Display text for close link
-		prevText: '<Prev', // Display text for previous month link
-		nextText: 'Next>', // Display text for next month link
+		prevText: '<Prev', // Display text for previous month link
+		nextText: 'Next>', // Display text for next month link
 		currentText: 'Today', // Display text for current month link
 		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Names of days starting at Sunday
 		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
@@ -1182,7 +1182,7 @@
 						(unselectable ? '' : ' onmouseover="jQuery(this).addClass(\'datepicker_daysCellOver\');"' +
 						' onmouseout="jQuery(this).removeClass(\'datepicker_daysCellOver\');"' +
 						' onclick="jQuery.datepicker._selectDay(' + this._id + ',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
-						(otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months
+						(otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months
 						(unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
 					printDate.setDate(printDate.getDate() + 1);
 				}

Change History (4)

comment:1 Changed 15 years ago by kbwood

Changed named entities to character entities

comment:2 Changed 15 years ago by paul

Resolution: fixed
Status: newclosed

comment:3 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:4 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.