logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 5077549c7314c5ba18160a2a1a0bb303f143c182
parent 32ed09bae56a9a10e50906fc80cdd0f2357bceb3
Author: Shpuld Shpludson <shp@cock.li>
Date:   Tue, 15 Dec 2020 19:49:32 +0000

Merge branch 'fix/no-emoji-in-poll-when-voting' into 'develop'

fix #1026 use title html for poll options before vote

Closes #1026

See merge request pleroma/pleroma-fe!1307

Diffstat:

MCHANGELOG.md1+
Msrc/components/poll/poll.vue3++-
Msrc/services/entity_normalizer/entity_normalizer.service.js2+-
3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed pinned statuses not appearing in user profiles - Fixed some elements not being keyboard navigation friendly - Fixed your latest chat messages disappearing when closing chat view and opening it again during the same session +- Fixed custom emoji not showing in poll options before voting ### Changed - Errors when fetching are now shown with popup errors instead of "Error fetching updates" in panel headers diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue @@ -42,7 +42,8 @@ :value="index" > <label class="option-vote"> - <div>{{ option.title }}</div> + <!-- eslint-disable-next-line vue/no-v-html --> + <div v-html="option.title_html" /> </label> </div> </div> diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js @@ -280,7 +280,7 @@ export const parseStatus = (data) => { if (output.poll) { output.poll.options = (output.poll.options || []).map(field => ({ ...field, - title_html: addEmojis(field.title, data.emojis) + title_html: addEmojis(escape(field.title), data.emojis) })) } output.pinned = data.pinned