1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Merge pull request #4694 from justin-sleep/remove-escape-backslashes

Remove escape backslashes in non-Markdown messages
This commit is contained in:
Travis Ralston
2020-06-17 11:06:04 -06:00
committed by GitHub
3 changed files with 16 additions and 8 deletions

View File

@ -42,6 +42,10 @@ export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} =
if (!parser.isPlainText() || forceHTML) {
return parser.toHTML();
}
// ensure removal of escape backslashes in non-Markdown messages
if (md.indexOf("\\") > -1) {
return parser.toPlaintext();
}
}
export function textSerialize(model: EditorModel) {