[18.0][FIX] sale_order_line_cancel: render chatter markup instead of escaping it - #4551
Open
divad1196 wants to merge 1 commit into
Open
[18.0][FIX] sale_order_line_cancel: render chatter markup instead of escaping it#4551divad1196 wants to merge 1 commit into
divad1196 wants to merge 1 commit into
Conversation
…ng it Odoo 18 requires ``Markup`` for html messages. Otherwise, the text is just escaped and renders as raw text
simahawk
approved these changes
Aug 27, 2026
jbaudoux
reviewed
Aug 27, 2026
| body=Markup( | ||
| self.env._("<b>%(product)s</b>: The order line has been canceled") | ||
| ) | ||
| % {"product": line.product_id.display_name} |
Contributor
There was a problem hiding this comment.
IMO you should keep this inside the env._()
Contributor
Author
There was a problem hiding this comment.
@jbaudoux no, otherwise it becomes an attack vector because it won't be escaped properly.
EDIT: did you mean to also translate the product? If yes, I can change to
instead. This one is ok display_name already translated
Contributor
There was a problem hiding this comment.
› otherwise it becomes an attack vector because it won't be escaped properly.
Ah yes indeed
jbaudoux
approved these changes
Aug 27, 2026
TDu
approved these changes
Aug 31, 2026
Contributor
|
This PR has the |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Odoo 18 requires
Markupfor html messages.Otherwise, the text is just escaped and renders as raw text