aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-02-01 16:52:04 -0500
committerScott González <scott.gonzalez@gmail.com>2013-02-01 16:52:04 -0500
commitdf179542cc6593b1816d487c72c470a73940ff11 (patch)
tree95a58e5ff732e05d24d44272a5ea8a821780287a /tests
parentdddf2a7ca194de8bcaaa0965ec269c851f94e16d (diff)
downloadjquery-ui-df179542cc6593b1816d487c72c470a73940ff11.tar.gz
jquery-ui-df179542cc6593b1816d487c72c470a73940ff11.zip
Datepicker: Escape single quotes in tooltips. Fixes #9049 - Datepicker beforeShowDay tooltip not displayed properly if single quote is used.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/datepicker/datepicker_options.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index dac2262dc..1efd854a9 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -782,6 +782,21 @@ test("callbacks", function() {
inp.datepicker("hide").datepicker("destroy");
});
+test("beforeShowDay - tooltips with quotes", function() {
+ expect( 1 );
+ var inp, dp;
+ inp = TestHelpers.datepicker.init("#inp", {
+ beforeShowDay: function() {
+ return [ true, "", "'" ];
+ }
+ });
+ dp = $("#ui-datepicker-div");
+
+ inp.datepicker("show");
+ equal( dp.find( ".ui-datepicker-calendar td:contains('9')").attr( "title" ), "'" );
+ inp.datepicker("hide").datepicker("destroy");
+});
+
test("localisation", function() {
expect( 24 );
var dp, month, day, date,