Merge pull request 'fix bio being interpreted as html for editing' (#3482) from fix-bio-18 into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3482
This commit is contained in:
HJ 2026-03-06 11:08:39 +00:00
commit e3234226a3
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import ldEscape from 'lodash/escape'
import isEqual from 'lodash/isEqual'
import merge from 'lodash/merge'
import ldUnescape from 'lodash/unescape'
@ -159,6 +160,9 @@ export default {
this.$store.dispatch('fetchUserRelationship', this.user.id)
},
computed: {
escapedNewBio() {
return ldEscape(this.newBio).replace(/\n/g, '<br>')
},
somethingToSave() {
if (this.newName !== this.user.name_unescaped) return true
if (this.newBio !== ldUnescape(this.user.description)) return true

View file

@ -358,7 +358,7 @@
v-if="!hideBio"
class="user-card-bio"
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
:html="editable ? newBio.replace(/\n/g, '<br>') : user.description_html"
:html="editable ? escapedNewBio : user.description_html"
:emoji="editable ? emoji : user.emoji"
:handle-links="true"
/>