Describe your bug or feature request.
When adding order admin comment with new lines. Then saved comment is displayed without new lines but with plain text '
'.
LogCommentForm::submitForm() contains code to convert new line to br tag before saving the log message into db. Maybe it would be better to not do this and enable 'Convert newlines to HTML
tags' for the 'Log: Rendered entity' field in the 'Commerce activity' view. In such case we can have HTML tag for the new lines.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | commerce-fix_new_lines_in_logs-3559548-8.x-2.40.patch | 1.29 KB | khiminrm |
| #2 | admin_comment_with_new_lines.png | 13.18 KB | khiminrm |
Issue fork commerce-3559548
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
khiminrm commentedComment #4
khiminrm commentedAttached patch for 8.x-2.40
Comment #6
jsacksick commentedComment #8
ivnishForgot to commit?
Comment #9
jsacksick commentedReopening after discussing this with @rszrama who thinks no escaping should happen on input but rather on output... Currently apostrophies are wrongfully escaped.
@khiminrm: Could you look into this?
Comment #10
jsacksick commentedOk, so let's stop escaping on input. The same "bug" affects the customer comment and the admin comment.
We likely need to expand our tests.
Comment #13
jsacksick commented@tbkot: Can we, in the tests confirm the input is filtered?
Right now there is nothing that confirms the
<script>is properly escaped.Comment #15
jsacksick commented