PDA

View Full Version : FileUploadField: Submitting Html-code not working



wuschba
25 Nov 2010, 1:32 PM
Hello!

I have a form with a FileUploadField and a normal text-field. Everything works fine until I enter some Html-Code into the text-field, like:
<p>my textfield</p>

This gives me the error: "unterminated regular expression literal in ext-all-debug.js" line 4233.

Some investigations showed that the responseText which JsExt tries to json-decode is:
({"success":true,"data":{"MyTextField":"<p>my textfield&lt;\/p&gt;"}})</p>
while it SHOULD be:
({"success":true,"data":{"MyTextField":"<p>my textfield</p>"}})

The error does not occur when setting fileUpload: false on the form. Of course then the file-upload does not work anymore.

It seems the detour about the iframe used by the upload-field destroys any html-code submitted in other fields. Any idea how to fix this?

wuschba
25 Nov 2010, 1:47 PM
Ah, sorry, just found the solution: http://www.sencha.com/forum/showthread.php?115945-Problem-woth-FileUpload