diff --git a/backend/src/middleware/handleHtmlContent/notifications/extractMentionedUsers.spec.js b/backend/src/middleware/handleHtmlContent/notifications/extractMentionedUsers.spec.js index d114ba1d2..a631b64a3 100644 --- a/backend/src/middleware/handleHtmlContent/notifications/extractMentionedUsers.spec.js +++ b/backend/src/middleware/handleHtmlContent/notifications/extractMentionedUsers.spec.js @@ -4,7 +4,7 @@ const contentWithMentions = '

Something inspirational about @bob-der-baumeister and @jenny-rostock.

' const contentEmptyMentions = '

Something inspirational about @bob-der-baumeister and @jenny-rostock.

' -const contentWithLinks = +const contentWithPlainLinks = '

Something inspirational about @bob-der-baumeister and @jenny-rostock.

' describe('extractMentionedUsers', () => { @@ -15,7 +15,7 @@ describe('extractMentionedUsers', () => { }) it('ignores links without .mention class', () => { - expect(extractMentionedUsers(contentWithLinks)).toEqual([]) + expect(extractMentionedUsers(contentWithPlainLinks)).toEqual([]) }) describe('given a link with .mention class and `data-mention-id` attribute ', () => { diff --git a/backend/src/middleware/xssMiddleware.js b/backend/src/middleware/xssMiddleware.js index c50585596..f98ab9d61 100644 --- a/backend/src/middleware/xssMiddleware.js +++ b/backend/src/middleware/xssMiddleware.js @@ -9,7 +9,6 @@ function clean(dirty) { return dirty } - // Convert embeds to a-tags dirty = linkifyHtml(dirty) dirty = sanitizeHtml(dirty, { allowedTags: [ diff --git a/webapp/components/Editor/Editor.story.js b/webapp/components/Editor/Editor.story.js index 974c3f85d..aaaa0eb58 100644 --- a/webapp/components/Editor/Editor.story.js +++ b/webapp/components/Editor/Editor.story.js @@ -23,7 +23,7 @@ const plugins = [ ] helpers.init({ plugins }) -const users = [{ id: 1, slug: 'peter' }, { id: 1, slug: 'sandra' }, { id: 1, slug: 'jane' }] +const users = [{ id: 1, slug: 'peter' }, { id: 2, slug: 'sandra' }, { id: 3, slug: 'jane' }] storiesOf('Editor', module) .addDecorator(withA11y) @@ -93,7 +93,7 @@ storiesOf('Editor', module) content: `

Here you can mention people like - @sandra and others. + @sandra and others. Try it out!

`, diff --git a/webapp/components/Editor/defaultExtensions.spec.js b/webapp/components/Editor/defaultExtensions.spec.js index 2de8d8c25..39525352a 100644 --- a/webapp/components/Editor/defaultExtensions.spec.js +++ b/webapp/components/Editor/defaultExtensions.spec.js @@ -29,7 +29,7 @@ describe('defaultExtensions', () => { describe('`content` contains a mentioning', () => { beforeEach(() => { content = - '

This is a post content mentioning @alicia-luettgen.

' + '

This is a post content mentioning @alicia-luettgen.

' }) it('renders mentioning as link', () => {