-
Notifications
You must be signed in to change notification settings - Fork 174
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
[Instruments] Escaping issue optimal - Only HTML escape on data retrieval #7777
Conversation
@@ -53,6 +53,15 @@ | |||
$useObjects =true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating this tool cause it still might be used in this release by some projects and it was broken
713bded
to
ce6b4c9
Compare
closing for now. will require a substantial amount of work |
…#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
7196d88
to
b7d7b20
Compare
…eval Update instrument_HTML_escape_repair.php phpcs
b7d7b20
to
ed19695
Compare
@driusan I dont' know if there is a need for a script to remove already encoded data (it seems unlikely that any already exist outside of instruments) so technically this is ready for review |
I just dont think this is gonna happen and no issues have recently poped up about it. |
Brief summary of changes
This PR fixes the escaping issue that occurs when a text field in an instrument contains an HTML special character. The solution employed here is to avoid HTML escaping special characters before database save and to instead escape them on form load (in the display logic).
Cons:
Pros:
Modules using LorisForm affected by changes (other than instruments):
Modules NOT using LorisForm (directly loading data) affected by changes: (added to https://github.com/aces/Loris/projects/27)
Modules NOT loading any data on forms (LorisForm or otherwise)
Found using search on
addTextAreaGroup(unused)createTextArea(unused)addTextAreaGroup(unused)createDate(unnecessary)addDate(unnecessary)createStatic(unnecessary)addStatic(unnecessary)createTime(unnecessary/unused)addTime(unnecessary/unused)year(unnecessary/unused)file(unnecessary/unused)checkbox(unnecessary/unused)Alternate to: #7776
Fixes #7489
Replaces #7490
Testing instructions (if applicable)
Make sure to test other usecases as well
"
,<
,>
or&
in the stringReview:
Link(s) to related issue(s)