Opened 11 years ago
Closed 11 years ago
#10518 closed bug (worksforme)
HTML comments break when() then()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.6.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.when("/my/ajax/url.php").then(function(html) {
breaks if the html begins with a comment
}
I've tried to create a test case using jsFiddle - http://jsfiddle.net/wheresrhys/dggAB/#base - but struggling with getting the ajax API to return anything at all
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Owner: | set to [email protected]… |
Priority: | undecided → low |
Status: | new → pending |
You can mock ajax requests using jsFiddle by using '/echo/json/' or '/echo/jsonp/'. Could you let us know once you've updated it and is reproducing the issue you experienced?
comment:3 Changed 11 years ago by
But I've been trying to use the jsFiddle API for echo/html/ and it keeps on returning an empty string. The test case is set up at http://jsfiddle.net/wheresrhys/dggAB/#base aside from that I can't get the echo/html API to work.
comment:4 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | pending → closed |
Use type instead of method. Works for me.
Just realised I shoudl've included an example of code that breaks when html begins with a comment, so: