Skip to main content

Bug Tracker

Side navigation

#1949 closed bug (fixed)

Opened November 20, 2007 02:05PM UTC

Closed November 24, 2007 08:17PM UTC

UI's popup calendar contains HTML entities

Reported by: pytechd Owned by:
Priority: minor Milestone: 1.2.2
Component: ui 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);
 				}
Attachments (0)
Change History (2)

Changed November 22, 2007 11:36AM UTC by kbwood comment:1

Changed named entities to character entities

Changed November 24, 2007 08:17PM UTC by paul comment:2

resolution: → fixed
status: newclosed