Fix pills being broken by unescaped characters
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
36fea4d487
commit
95eaf94cd8
4 changed files with 30 additions and 2 deletions
|
@ -43,4 +43,16 @@ describe('editor/serialize', function() {
|
|||
const html = htmlSerializeIfNeeded(model, {});
|
||||
expect(html).toBe("<em>hello</em> world");
|
||||
});
|
||||
it('displaynames ending in a backslash work', function () {
|
||||
const pc = createPartCreator();
|
||||
const model = new EditorModel([pc.userPill("Displayname\\", "@user:server")]);
|
||||
const html = htmlSerializeIfNeeded(model, {});
|
||||
expect(html).toBe("<a href=\"https://matrix.to/#/@user:server\">Displayname\</a>");
|
||||
});
|
||||
it('displaynames containing a closing square bracket work', function () {
|
||||
const pc = createPartCreator();
|
||||
const model = new EditorModel([pc.userPill("Displayname]", "@user:server")]);
|
||||
const html = htmlSerializeIfNeeded(model, {});
|
||||
expect(html).toBe("<a href=\"https://matrix.to/#/@user:server\">Displayname]</a>");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue