Skip to main content

Bug Tracker

Side navigation

#13280 closed bug (duplicate)

Opened January 21, 2013 09:08AM UTC

Closed January 21, 2013 07:10PM UTC

Last modified February 18, 2013 06:16AM UTC

create a jq element from string

Reported by: army8735@qq.com 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>"

Attachments (0)
Change History (3)

Changed January 21, 2013 05:02PM UTC by Motty comment:1

_comment0: This is a duplicate of #13223, also see the [http://stage.jquery.com/upgrade-guide/1.9/#jquery-htmlstring-versus-jquery-selectorstring 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.1358787817449894
_comment1: This is a duplicate of #13223, also see the [http://stage.jquery.com/upgrade-guide/1.9/#jquery-htmlstring-versus-jquery-selectorstring 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 an EMPTY page1358787852798006
_comment2: This is a duplicate of #13223, also see the [http://stage.jquery.com/upgrade-guide/1.9/#jquery-htmlstring-versus-jquery-selectorstring 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!1358787917889067

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!

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js"></script>
</head>
<body>
</body>
</html>

Changed January 21, 2013 07:10PM UTC by timmywil comment:2

resolution: → duplicate
status: newclosed

Duplicate of #13233.

Changed February 18, 2013 06:16AM UTC by army8735@qq.com comment:3

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 );