Skip to main content

Bug Tracker

Side navigation

Ticket #3803: jq13bug.html


File jq13bug.html, 1.9 KB (added by ghum, January 07, 2009 12:40PM UTC)

Sample file to reproduce the described bug

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>jQuery 1.3 selector with escaped dots does not select subelement</title>
</head>
<body>
<div id="content">
<form action="/fedit/yoman" method="post"  id="xh1">
<table id="haupttabelle" class="formtable"><tr><td colspan="2">
<fieldset><table class="fst">
<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
<input checked="checked" type="radio" name="i7922.dxa" value="nein" class="jnr" />nein
<input type="radio" name="i7922.dxa" value="unbeantwortet" class="jnr" />unbeantwortet</div></td></tr>

<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
<input checked="checked" type="radio" name="i6054.dxa" value="nein" class="jnr" />nein
<input type="radio" name="i6054.dxa" value="unbeantwortet" class="jnr" />unbeantwortet</div></td></tr>
</table></fieldset></td></tr>

</table>
</form>
</div>

<script src="../static/jquery-1.3b1.js" type="text/javascript"></script>
<script type="text/javascript">
console.log("correct selection of ancestors with id");
console.log($("#i6054dxa input"));
console.log("correct selection of element with escaped dot");
console.log($("#i7922\\.dxa"));
console.log("no selection of ancestors if ID contains escaped dot");
console.log($("#i7922\\.dxa input"));
console.log("this would be the expected result");
console.log($("#i7922\\.dxa").find("input"));


</script>

</body>
</html>

Download in other formats:

Original Format