diff --git a/webapp/src/utils.test.ts b/webapp/src/utils.test.ts index 0adb89cf3..c07aba6a9 100644 --- a/webapp/src/utils.test.ts +++ b/webapp/src/utils.test.ts @@ -29,7 +29,7 @@ describe('utils', () => { test('should not allow XSS on links href on the desktop app', () => { const windowAsAny = window as any windowAsAny.openInNewBrowser = () => null - const expectedHtml = '

' + const expectedHtml = '

' expect(Utils.htmlFromMarkdown('[]("xss-attack="true"other="whatever)')).toBe(expectedHtml) windowAsAny.openInNewBrowser = null }) diff --git a/webapp/src/utils.ts b/webapp/src/utils.ts index 4e7b40b86..ef2860399 100644 --- a/webapp/src/utils.ts +++ b/webapp/src/utils.ts @@ -113,7 +113,7 @@ class Utils { // HACKHACK: Somehow, marked doesn't encode angle brackets const renderer = new marked.Renderer() if ((window as any).openInNewBrowser) { - renderer.link = (href, title, contents) => `${contents}` + renderer.link = (href, title, contents) => `${contents}` } const html = marked(text.replace(/