Bug Tracker

Ticket #3803: jq13bug.html

File jq13bug.html, 1.9 KB (added by ghum, 11 years ago)

Sample file to reproduce the described bug

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
3<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
4<title>jQuery 1.3 selector with escaped dots does not select subelement</title>
5</head>
6<body>
7<div id="content">
8<form action="/fedit/yoman" method="post"  id="xh1">
9<table id="haupttabelle" class="formtable"><tr><td colspan="2">
10<fieldset><table class="fst">
11<tr class="ef" id="i7922.dxa" ><td class="lcl"><label class="el" for="i7922.dxa" >janein 200808211820</label></td><td class="icl"><div class="janaunb"><input type="radio" name="i7922.dxa" value="ja" class="jnr" />ja
12<input checked="checked" type="radio" name="i7922.dxa" value="nein" class="jnr" />nein
13<input type="radio" name="i7922.dxa" value="unbeantwortet" class="jnr" />unbeantwortet</div></td></tr>
14
15<tr class="ef" id="i6054dxa" ><td class="lcl"><label class="el ltb" for="i6054.dxa" >Nüberdrüner</label></td><td class="icl"><div class="janaunb"><input type="radio" name="i6054.dxa" value="ja" class="jnr" />ja
16<input checked="checked" type="radio" name="i6054.dxa" value="nein" class="jnr" />nein
17<input type="radio" name="i6054.dxa" value="unbeantwortet" class="jnr" />unbeantwortet</div></td></tr>
18</table></fieldset></td></tr>
19
20</table>
21</form>
22</div>
23
24<script src="../static/jquery-1.3b1.js" type="text/javascript"></script>
25<script type="text/javascript">
26console.log("correct selection of ancestors with id");
27console.log($("#i6054dxa input"));
28console.log("correct selection of element with escaped dot");
29console.log($("#i7922\\.dxa"));
30console.log("no selection of ancestors if ID contains escaped dot");
31console.log($("#i7922\\.dxa input"));
32console.log("this would be the expected result");
33console.log($("#i7922\\.dxa").find("input"));
34
35
36</script>
37
38</body>
39</html>