Fix #14074: element id="nodeName" #1389

Closed
wants to merge 3 commits into
from

2 participants

@gibson042
jQuery Foundation member

#1373 seems to have been abandoned, so here's an alternative.

   raw     gz Compared to 1.x-master @ 94a9a4f1c2db7b80111fe24afc46de7c303f5a29
   -13    +14 dist/jquery.js
   -18     +8 dist/jquery.min.js
@rwaldron rwaldron and 2 others commented on an outdated diff Oct 2, 2013
// Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 2, 2013

@gibson042 could you include a explanation comment? Thanks!

@dmethvin
jQuery Foundation member
dmethvin added a line comment Oct 3, 2013

@rwaldron about the use of the trailing space, or the clsid? The comment above does the latter (well when combined with the conditional below).

@gibson042
jQuery Foundation member
gibson042 added a line comment Oct 3, 2013

I updated to explain both a little better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rwaldron rwaldron commented on the diff Oct 2, 2013
test/data/core/aliased.html
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>alias-masked DOM properties (#14074)</title>
+ <script>
+ var errors = [];
+ window.onerror = function( errorMessage, filePath, lineNumber ) {
+ errors.push( errorMessage );
+ };
+ </script>
+ <script src="../../jquery.js"></script>
+</head>
+<body>
+ <form>
+ <input type="text" id="nodeName"/>
@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 2, 2013

/> is unnecessary with this doctype ;)

@dmethvin
jQuery Foundation member
dmethvin added a line comment Oct 3, 2013

Probably good to keep it though, since we may want to do do XHTML tests and would want to keep the markup compatible with both.

@gibson042
jQuery Foundation member
gibson042 added a line comment Oct 3, 2013

Good point @dmethvin; I fixed up the meta tag too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dmethvin dmethvin referenced this pull request Oct 3, 2013
Closed

Fix for bug #14074 #1373

@dmethvin
jQuery Foundation member

Yeah this looks a little more bulletproof.

@rwaldron rwaldron commented on the diff Oct 3, 2013
src/data.js
noData: {
- "applet": true,
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ "applet ": true,
+ "embed ": true,
+ // ...but Flash objects (which have this classid) *can* handle expandos
+ "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 3, 2013

@dmethvin I don't know where your comment went, but in response, the latter I'm very familiar with, it was the trailing spaces in the property names that I'm curious about. I think we can all agree it's not the sort of thing you'd normally see, so I think a small comment explaining why is not a bad idea.

@mgol
jQuery Foundation member
mgol added a line comment Oct 3, 2013

+1 for the comment, at first glance it seems like a mistake so it'd be good to clarify what's happening here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@gibson042
jQuery Foundation member

I'd like to land this for the next beta. Does anyone object?

@dmethvin
jQuery Foundation member

LGTM

@gibson042 gibson042 added a commit that closed this pull request Nov 7, 2013
@gibson042 gibson042 Fix #14074: element id="nodeName". Close gh-1389.
(cherry picked from commit 126d596)

Conflicts:

	src/data.js
	src/data/accepts.js
	test/unit/core.js
	test/unit/data.js
c66a5e7
@gibson042 gibson042 closed this in c66a5e7 Nov 7, 2013
@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@gibson042 gibson042 Fix #14074: element id="nodeName". Close gh-1389. 2588505
@bperel bperel pushed a commit that referenced this pull request Jul 21, 2015
@gibson042 gibson042 Fix #14074: element id="nodeName". Close gh-1389.
(cherry picked from commit 126d596)

Conflicts:

	src/data.js
	src/data/accepts.js
	test/unit/core.js
	test/unit/data.js
b56e00e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment