-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] website: decode special characters of website form
Steps to reproduce: - Add a form on the website. - Add a field and put `test"` as label. - Save and send the form. -> `test"` is displayed in the received mail. Since [1] (and [2]), some characters are escaped when the user changes the label of a field. The problem appeared since [3] where fields are escaped on the server side upon form reception. Indeed, here is what happens at form reception; the already escaped `test"` is stored as `test&quot;` in the database. Due to it, the mail displayed contains `test"` while `test"` is wanted. To solve the problem, the characters encoded at label change in the client side are decoded on the server side before the form is processed. This is done at the server side as we still encode client-side since it appears that if a form is sent with an input that has a `"` character in its `name` attribute, it is received as `%22` server side (see previous commit in-code comment for details). [1]: odoo@ccaf4f1 [2]: odoo@03f230a [3]: odoo@db62d8c task-3510450 closes odoo#135797 Signed-off-by: Quentin Smetz (qsm) <[email protected]>
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters