View Full Version : HTMLEditor (encode/decode)

1 Sep 2010, 11:04 AM
I have a form with a HTMLEditor as part of it. The problem is that the value of the editor needs to be encoded prior to submitting to the backend and decoded when loading it back into the form.

Is there a standard approach to encoding/decoding the value using Ext.[en|de]code functions? Right now my form is simply submitted through the .getForm().submit({});

3 Sep 2010, 4:26 AM
I've managed to figure out what I needed to do to solve this issue. The good news is that the data was persisting fine into the backend, the issue arose when attempting to reform a JSON response with the same raw data out of the database.

I use the json library from org.json, and to solve my issue I simply had to use the JSONObject.quote(String) method. This properly encodes the string and once this was in place, things were good.