diff --git a/src/editor/serialize.js b/src/editor/serialize.js index 03f3759ea0..ba380f2809 100644 --- a/src/editor/serialize.js +++ b/src/editor/serialize.js @@ -41,14 +41,6 @@ export function htmlSerializeIfNeeded(model, {forceHTML = false} = {}) { if (!parser.isPlainText() || forceHTML) { return parser.toHTML(); } - // Format "plain" text to ensure removal of backslash escapes - // https://github.com/vector-im/riot-web/issues/11230 - // https://github.com/vector-im/riot-web/issues/2870 - const postParsePlaintext = parser.toPlaintext(); - if (postParsePlaintext !== md) { - // only return "formatted" text if it differs from the source text - return postParsePlaintext; - } } export function textSerialize(model) { diff --git a/test/editor/serialize-test.js b/test/editor/serialize-test.js index 9d116cdc4b..7517e46437 100644 --- a/test/editor/serialize-test.js +++ b/test/editor/serialize-test.js @@ -43,10 +43,4 @@ describe('editor/serialize', function() { const html = htmlSerializeIfNeeded(model, {}); expect(html).toBe("hello world"); }); - it('escaped markdown should not retain backslashes', function() { - const pc = createPartCreator(); - const model = new EditorModel([pc.plain('\\*hello\\* world')]); - const html = htmlSerializeIfNeeded(model, {}); - expect(html).toBe('*hello* world'); - }); });