mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
remove links from post card exceprts to prevent invalid html as its already an a tag
This commit is contained in:
parent
1d009acded
commit
0bb4213593
@ -9,7 +9,7 @@
|
|||||||
style="cursor: pointer; position: relative;">
|
style="cursor: pointer; position: relative;">
|
||||||
<div
|
<div
|
||||||
class="hc-editor-content"
|
class="hc-editor-content"
|
||||||
v-html="post.contentExcerpt" />
|
v-html="excerpt" />
|
||||||
<ds-space />
|
<ds-space />
|
||||||
<ds-space
|
<ds-space
|
||||||
margin="small"
|
margin="small"
|
||||||
@ -53,6 +53,12 @@ export default {
|
|||||||
default: true
|
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: {
|
methods: {
|
||||||
href(post) {
|
href(post) {
|
||||||
return this.$router.resolve({
|
return this.$router.resolve({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user