Hi,
I have found a bug in the web chat plugin where quotation marks are added around auto-populated values when “Populate with user’s previous choice” option is used.
-
Edit the form UI for a workgroup from the admin console to enable “Populate with user’s previous choice” option for a text field.
-
After saving the form, complete a chat session via the fastpath webchat plugin, filling in the field mentioned above with a value.
-
On starting a second session, the value auto-populated in the form is wrapped in “”.
-
Every time a new chat is started, an extra set of quotation marks is added.
The problem occurs because in the FormUtils class (http://svn.igniterealtime.org/svn/repos/fastpath/webchat/trunk/src/java/org/jive software/webchat/util/FormUtils.java) the form field’s entire value attribute is escaped, when it should just be the actual field value retrieved from the cookie which is escaped.
I have attached a patch which fixes the issue, which I hope can be incorporated.
Please let me know if there is anything further I need to do, or if I need to post this elsewhere, as it is likely that I may have other fixes that I can contribute back to the community.
Thanks & Regards
Stuart
FormUtils.patch.zip (528 Bytes)