Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13278 closed bug (notabug)

Convert variable data to jQuery object

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:


Hello, I've noticed that since upgrading to 1.9.0 handling data as jQuery object stopped working for me. To explain what I mean here, here's a short example of ajax call:

 type : 'POST',
 url : 'someServerScript',
 data : 'someData',
 success : function(data) { // return data is a piece of HTML
   // With previous version, I was able to do this:

   // In version 1.9.0 I get error 'unrecognized expression'

Please let me know if that description is enough or if I need to collaborate more

Thanks, Oleg

Change History (4)

comment:1 Changed 10 years ago by dmethvin

Owner: set to [email protected]
Status: newpending

Did the jQuery Migrate plugin give you any warnings?

comment:2 Changed 10 years ago by Oleg Yapparov <[email protected]…>

Here's a jQuery Migrate notice: JQMIGRATE: $(html) HTML strings must start with '<' character

And here's the example return data logged in Firebug console, HTML is correct:

<form action="post" method="post">
   <input type="text" size="30" /><br />
   <textarea cols="30" rows="5"> </textarea>

comment:3 Changed 10 years ago by dmethvin

Resolution: notabug
Status: pendingclosed

Well there you go, your string must not start with '<'. Read the upgrade guide or description in the Migrate plugin and it will help.

comment:4 Changed 10 years ago by anonymous

Perfect, thanks, couldn't find it there before. $.parseHTML() function helped

Note: See TracTickets for help on using tickets.