diff options
author | Felix Nagel <info@felixnagel.com> | 2012-11-28 23:29:15 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-11-28 23:29:15 +0100 |
commit | 36533a718da41d4dc82286d2b7ff52a34481dbbb (patch) | |
tree | 481804cc832f9b8223fd243de8f6ca8dbd119fa2 /tests/unit/tooltip/tooltip_options.js | |
parent | 4e68c526ab464facc56e5b85ca67f4c6648d2f21 (diff) | |
parent | 37ea7341823e7dfe54f37596b1d054b8a2e5c3de (diff) | |
download | jquery-ui-36533a718da41d4dc82286d2b7ff52a34481dbbb.tar.gz jquery-ui-36533a718da41d4dc82286d2b7ff52a34481dbbb.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/tooltip/tooltip_options.js')
-rw-r--r-- | tests/unit/tooltip/tooltip_options.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index f9da27fb7..01ac25040 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -16,6 +16,20 @@ test( "content: default", function() { deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "anchortitle" ); }); +test( "content: default; HTML escaping", function() { + expect( 2 ); + var scriptText = "<script>$.ui.tooltip.hacked = true;</script>", + element = $( "#tooltipped1" ); + + $.ui.tooltip.hacked = false; + element.attr( "title", scriptText ) + .tooltip() + .tooltip( "open" ); + equal( $.ui.tooltip.hacked, false, "script did not execute" ); + deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), scriptText, + "correct tooltip text" ); +}); + test( "content: return string", function() { expect( 1 ); var element = $( "#tooltipped1" ).tooltip({ |