Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LorisForm] HTML Text Element does not display quotes #7489

Closed
CamilleBeau opened this issue Jun 18, 2021 · 0 comments · Fixed by #7776
Closed

[LorisForm] HTML Text Element does not display quotes #7489

CamilleBeau opened this issue Jun 18, 2021 · 0 comments · Fixed by #7776
Labels
Category: Bug PR or issue that aims to report or fix a bug

Comments

@CamilleBeau
Copy link
Contributor

CamilleBeau commented Jun 18, 2021

Describe the bug
When a quotation is entered into a text element of an instrument (not text area element), and then saved, the element is saved properly but does not display on the front end. Here are some screenshots for an example:
image
image

This is because of how the HTML element is rendered:
<input name="pulmonary_issues_specific" type="text" class="form-control input-sm" value="testing mid-"quotes"" >
This is not an issue for any other HTML special chars.

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to medical history instrument in the raisinbread data (or another instrument that has text element)
  2. Attempt to save values in quotations
  3. Save
  4. See that the value is saved properly in the back end, but does not display properly on the front end.

Additional context
Issue & PR made on CCNA

@CamilleBeau CamilleBeau added the Category: Bug PR or issue that aims to report or fix a bug label Jun 18, 2021
driusan pushed a commit that referenced this issue Nov 17, 2021
…#7776)

This fixes the escaping issue that occurs when a text field in an instrument contains an HTML special character. The solution employed here is to redirect on successful save to reload data directly from the database instead of loading it using the _POST data.

This solution is sub-optimal because the escaping issue will still occur when an error is detected on instrument save and the values MUST be reloaded from the _POST array where the reload can not occur to avoid losing the unsaved data.

Alternate to: #7777
Fixes #7489
Replaces #7490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug
Projects
None yet
1 participant