diff --git a/webapp/components/Editor/nodes/Hashtag.js b/webapp/components/Editor/nodes/Hashtag.js index d591c3e30..1b7ba4028 100644 --- a/webapp/components/Editor/nodes/Hashtag.js +++ b/webapp/components/Editor/nodes/Hashtag.js @@ -22,21 +22,24 @@ export default class Hashtag extends TipTapMention { ...super.schema, toDOM: (node) => { // use a dummy domain because URL cannot handle relative urls + // Wolle const url = new URL('/', 'https://example.org') + // Wolle url.searchParams.append('hashtag', node.attrs.id) const url = new URL('/', 'https://example.org') - url.searchParams.append('hashtag', node.attrs.id) + url.searchParams.append('search', '%23' + node.attrs.id) return [ 'a', { class: this.options.mentionClass, - href: `/${url.search}`, + href: `/search/search-results${url.search}`, 'data-hashtag-id': node.attrs.id, - target: '_blank', + // Wolle target: '_blank', }, `${this.options.matcher.char}${node.attrs.label}`, ] }, parseDOM: [ + // Wolle make sure that correct html goe to the database! after editing a post now the new 'href' goes to the database and it gets inconsistant { tag: 'a[data-hashtag-id]', getAttrs: (dom) => { diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index d23582ad7..29f805633 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -87,7 +87,7 @@ export default { }, mixins: [postListActions], data() { - const { hashtag = null } = this.$route.query + const { hashtag = null } = this.$route.query // Wolle remove with the rest? return { links, posts: [],