#13280 closed bug (duplicate)
create a jq element from string
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
var s = '\ <form></form>'; $(s);
when i use v1.9.0 this way, firefox shows error:
"Error: Syntax error, unrecognized expression: <form></form>
slice.call( docElem.childNodes, 0 )[0].nodeType;"
notice, there is a "\t" before "<form>"
Change History (3)
comment:3 Changed 11 years ago by
I'm afraid that this bug has not be fixed in 1.9.1.
I have seen the blog "http://blog.jquery.com/2013/02/04/jquery-1-9-1-released/", Ticket #13233 resolved, but this one left.
The console always show me an error: Error: Syntax error, unrecognized expression: <form></form> throw new Error( "Syntax error, unrecognized expression: " + msg );
Note: See
TracTickets for help on using
tickets.
This is a duplicate of #13223, also see the upgrade guide... but I think it's completely ridiculous that jQuery won't trim the string before determining if it is "valid" html or not.
Anyway, I'm now getting this error when initializing jQuery 1.9.0 in Firefox 18.0.1 on a page with an EMPTY body!