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
Bug fix: Fix triple HTML encoding #17247
Bug fix: Fix triple HTML encoding #17247
Conversation
Some values were encoded into HTML entities thrice. This commit removes unnecessary HTML escaping. Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
The values of < > ' " & are double escaped in the confirmation dialog. Since the values are inserted via twig into HTML, there is no need to escape them twice. Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Codecov Report
@@ Coverage Diff @@
## QA_5_1 #17247 +/- ##
============================================
- Coverage 57.78% 57.78% -0.01%
+ Complexity 15324 15323 -1
============================================
Files 471 471
Lines 62127 62124 -3
============================================
- Hits 35899 35896 -3
Misses 26228 26228
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| $columns = []; | ||
| foreach ($columnList as $column) { | ||
| $columns[] = htmlspecialchars($column); | ||
| } | ||
| if ($GLOBALS['cfg']['NaturalOrder']) { | ||
| usort($columns, 'strnatcasecmp'); | ||
| usort($columnList, 'strnatcasecmp'); | ||
| } | ||
| $this->response->addJSON('columns', $columns); | ||
|
|
||
| $this->response->addJSON('columns', $columnList); |
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.
I can confirm this part of the fix in the column select to add a foreign key when the column has a strange name
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.
Could you provide ways to test all the parts of this fix please ?
I could confirm one of the changes
There is also 1 more error when you try to delete a column called I hope these steps can be reproduced, let me know if not and I will prepare more detailed steps. |
Related to #17247. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Some values were double or even triple encoded in the HTML/JS. This resulted in garbled up text. This PR removed HTML escaping from places where it is not needed.
Cherry-picked from #17246 onto QA_5_1 branch