commit: ea0887a15ebc8e1563aa9a2fb90f2f1f2d7a93b1
parent ef5bbc4e5f84bb9e8da76a0440eea5d656d36977
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Tue, 16 Nov 2021 17:45:14 +0000
Merge branch 'fix/escape-display-name' into 'develop'
entity_normalizer: Escape name when parsing user
See merge request pleroma/pleroma-fe!1415
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js
@@ -24,7 +24,7 @@ library.add(
const ProfileTab = {
data () {
return {
- newName: this.$store.state.users.currentUser.name,
+ newName: this.$store.state.users.currentUser.name_unescaped,
newBio: unescape(this.$store.state.users.currentUser.description),
newLocked: this.$store.state.users.currentUser.locked,
newNoRichText: this.$store.state.users.currentUser.no_rich_text,
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -55,8 +55,9 @@ export const parseUser = (data) => {
}
output.emoji = data.emojis
- output.name = data.display_name
- output.name_html = escape(data.display_name)
+ output.name = escape(data.display_name)
+ output.name_html = output.name
+ output.name_unescaped = data.display_name
output.description = data.note
// TODO cleanup this shit, output.description is overriden with source data