Fixes improper escaping in edit message composer#8600
Fixes improper escaping in edit message composer#8600yaya-usman wants to merge 1 commit intomatrix-org:developfrom
Conversation
| // Escapes all markup in the given text | ||
| function escape(text: string): string { | ||
| return text.replace(/[\\*_[\]`<]|^>/g, match => `\\${match}`); | ||
| return text.replace(/[\\*_[\]`<]|^>/g, match => `${match}`); |
There was a problem hiding this comment.
This replace is now doing absolutely nothing? You're replacing match with itself
There was a problem hiding this comment.
Yeah, you're right. I could have done better just wanted to push my changes to get assigned. So i can continue working on it later.
There was a problem hiding this comment.
Nonetheless it seems to work without any problem even though it seems illogical, I'll probably need your help. I guess I need to figure out if any other part of the project is using this escape function if not I should probably remove it what do you think or figure out a better way to handle it
There was a problem hiding this comment.
Well no, it regresses the reason this code was added in the first place.
See element-hq/element-web#10722 + #8004
|
Abandoned - reopen if you are working on it. |
Fixes: vector-im/element-web#22127
Signed-off-by: Yaya Usman yaya-usman@users.noreply.github.com
Original Text

Before:
After:

Type: defect
Here's what your changelog entry will look like:
🐛 Bug Fixes