Closed Bug 674186 Opened 14 years ago Closed 14 years ago

<pre>JSON</pre> in File upload response

Categories

(Core :: General, defect)

5 Branch
All
Other
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: billy3321, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110622232440 Steps to reproduce: Upload file and handler the json return. Actual results: After uploaded file, if the page return a json not in text/plain content, firefox will add <pre> tag automaticly. Here has some information: http://stackoverflow.com/questions/3939741/ajaxfileupload-syntaxerror-missing-in-xml-expression http://www.sencha.com/forum/showthread.php?17248-lt-pre-gt-json-lt-pre-gt-in-File-upload-response-%28FF-only%29 Expected results: The pre tag should not be added.
Severity: normal → major
Product: Firefox → Core
QA Contact: general → general
Version: 4.0 Branch → 5 Branch
So this script is loading a text/plain file in an iframe, then examining the innerHTML of that iframe and hoping to recover the original text? The former will follow the steps at http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#read-text which will in fact generate a <pre> tag in the DOM of that iframe. Then the innerHTML will include the <pre> tag, of course. Presumably the file uploader thing should be looking at .textContent, not .innerHTML.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.