-
Notifications
You must be signed in to change notification settings - Fork 20.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table manipulation regression (XHTML) #2493
Labels
Milestone
Comments
If I test this in chrome: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<script src="https://code.jquery.com/jquery-3.0.0-alpha1.js"></script>
</head>
<body>
<table>
<thead>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
</thead>
<tbody id="append"></tbody>
</table>
<script>
$( "#append" )
.append( "<tr><td>4</td><td>5</td><td>6</td></tr>" )
.append( "<tr><td>7</td><td>8</td><td>9</td></tr>" )
;
</script>
</body>
</html> There is no problem. We can't use |
The doc has to be served with the right Looks like we can't do 0ea342a because of xhtml? |
anthonyryan1
added a commit
to anthonyryan1/jquery
that referenced
this issue
Jul 25, 2015
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intenitonally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." Reverts 0ea342a See also jquerygh-2031, jquerygh-2002 Closes jquerygh-2493
anthonyryan1
added a commit
to anthonyryan1/jquery
that referenced
this issue
Jul 25, 2015
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intentionally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." Reverts 0ea342a See also jquerygh-2031, jquerygh-2002 Closes jquerygh-2493
anthonyryan1
added a commit
to anthonyryan1/jquery
that referenced
this issue
Sep 9, 2015
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intentionally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." Reverts 0ea342a See also jquerygh-2031, jquerygh-2002 Closes jquerygh-2493
anthonyryan1
added a commit
to anthonyryan1/jquery
that referenced
this issue
Sep 9, 2015
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intentionally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." Reverts 0ea342a See also jquerygh-2031, jquerygh-2002 Closes jquerygh-2493
mgol
pushed a commit
that referenced
this issue
Sep 14, 2015
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intentionally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." (cherry-picked from 99e8ff1) Reverts 0ea342a Refs gh-2031 Refs gh-2002 Fixes gh-2493 Closes gh-2499
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
jQuery 3.0 introduced an XHTML regression in the appending and updating of table rows, it appears the outermost element in every
.append()
,.html()
,.load()
, etc gets removed and only the contents of that outermost element are actually appended or set as the innerHTML.Simple test case (requires
Content-type: application/xhtml+xml; charset=utf-8;
to properly demonstrate the regression)In XHTML mode, the resulting DOM is the equivalent of:
I've also noticed the XHTML test harness is once again broken and likely how this regression occurred, but that's outside the scope of this issue.
The text was updated successfully, but these errors were encountered: