Bug : FastPath WebChat adds quotation marks around auto-populated values

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.

  1. Edit the form UI for a workgroup from the admin console to enable “Populate with user’s previous choice” option for a text field.

  2. After saving the form, complete a chat session via the fastpath webchat plugin, filling in the field mentioned above with a value.

  3. On starting a second session, the value auto-populated in the form is wrapped in “”.

  4. 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)

I had to do a massive workaround to avoid this bug. Thanks Stuart this looks great. Do you know if they will patch it?

commited r12004 OF-412 thanks

Is there going to be a release of the compiled code? I am having the same issue with with FormUtil and just wondering if I need to compile from src or wait for a new compiled version.

EDIT: I had one of our devs compile just the webclient.jar if anyone wants it, I attached it.
webclient.jar.zip (285386 Bytes)