remove links from post card exceprts to prevent invalid html as its already an a tag

This commit is contained in:
Grzegorz Leoniec 2018-10-29 14:38:19 +01:00
parent 1d009acded
commit 0bb4213593

View File

@ -9,7 +9,7 @@
style="cursor: pointer; position: relative;">
<div
class="hc-editor-content"
v-html="post.contentExcerpt" />
v-html="excerpt" />
<ds-space />
<ds-space
margin="small"
@ -53,6 +53,12 @@ export default {
default: true
}
},
computed: {
excerpt() {
// remove all links from excerpt to prevent issues with the serounding link
return this.post.contentExcerpt.replace(/<a.*>(.+)<\/a>/gim, '')
}
},
methods: {
href(post) {
return this.$router.resolve({