Open eprager412 opened 1 year ago
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\":\"four %26lt%3Bfive -%26amp%3B%20%26gt%3B%20%26lt%3B\",\"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
The challenge with reproducing was not realizing that we need to 'entity-encode' (for curl) the 'xml-encoded' content, so <
becomes %26lt%3B
.
@eprager412 @pbowen-oc Could you please post the content of the instance sent to Enketo (a response to a request to /submission), such as below?
@MartijnR - This is visible on the form without reopening it.
Enter new query text:
After updating the query:
The other query in that screenshot is coming from the instance: It was entered as "test1 <test0" query less than.instance.txt
@MartijnR - Sorry for the confusion. The endpoint was incorrect in the original description. This issue occurs with the standard new form or existing form field submission endpoints. I changed it above to reflect that it occurs in /edit/fs/c/i/.
Describe the bug Text "<letter" displays null instead of "<letter" when viewing query, annotation, or reason for change in the Query Widget.
To Reproduce ---Annotations & Query----
If the text entered had been "some text <e", then the query display will be "some text". Everything starting with the first "<" is not displayed. The same occurs when reopening the form with an instance containing this query string. Note that the instance represents the "<" character as "<".
----Reason for Change----
Expected behavior Value displayed within record matches the value that the user entered for the query, annotation, or reason for change (including the "<" and characters after it.
Screenshots
Browser and OS (please complete the following information):
Other helpful info: There are no errors in the network tab when submitting or reviewing a query. The data entered for a query can be viewed in other areas of the system.