Open eprager412 opened 6 months ago
Ignore the below. I was for some reason thinking this happened when editing an existing record.
curl --user enketorules: -d \
"server_url=http://localhost:3000&form_id=language.test&ecid=a&lang=de&instance=\
<data xmlns:OpenClinica= \"http://openclinica.com/odm\" xmlns:enk= \"http://enketo.org/xforms\" xmlns:jr= \"http://openrosa.org/javarosa\" xmlns:oc= \"http://openclinica.org/xforms\" xmlns:orx= \"http://openrosa.org/xforms\" id= \"language.test\" version= \"1\">\
<page1>\
<locale_note />\
<yn1 />\
<locale_note_comment oc:queryParent= \"locale_note\" />\
<yn1_comment oc:queryParent= \"yn1\">\
{\"queries\":[{\"type\":\"comment\",\"id\":\"1\",\"date_time\":\"2023-01-18T11:34:36.608-05:00\",\"comment\":\"\\\"img1.png\\\" to \\\"img2.png\\\"\",\"status\":\"new\",\"assigned_to\":\"\",\"notify\":false,\"thread_id\":\"50b52cae-6c5b-4d1a-ab70-3e05b31e3784\"}]}</yn1_comment>\
</page1>\
<meta>\
<instanceID>uuid:e1623dbf-bf87-4b2a-8a5a-85ae832f31f3</instanceID>\
</meta></data>\
&instance_id=123" http://localhost:8005/oc/api/v1/instance/edit
@theywa - Can you work on this?
@pbowen-oc Sure, I just created a PR for the fix.
Hi @MartijnR, I just created a PR to fix the issue. Can you review it in your spare time? Thanks I found this issue happens only on new audit query where the string encoded after proceced by the translator code
comment = t('widget.dn.valuechange', { new:
"${this._getLabelForSelectValue(currentValue)}"
, previous:"${this._getLabelForSelectValue(previousValue)}"
, });
so I put the decode function to reset it back.
Describe the bug HTML code for double quotes appear in field history when text field is updated
To Reproduce
Open attached form in mode /single/fs/ history_html_simple.txt
In the Additional Comments field, type "ddd", tab off the field and open query widget 3: History displays Value changed from quotequote to quotedddquote Expected behavior History displays Value changed from "" to "ddd"
Screenshots
![history_html2](https://github.com/OpenClinica/enketo-express-oc/assets/74559963/28a3a39d-1864-421d-824b-2e6a84e3ae9d)
Browser and OS Windows/Chrome