use title html for poll options before vote

This commit is contained in:
Shpuld Shpuldson 2020-12-07 00:11:21 +02:00
parent 42c747a342
commit 415119cda9
3 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,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 pinned statuses not appearing in user profiles
- Fixed some elements not being keyboard navigation friendly - 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 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 ### Changed
- Errors when fetching are now shown with popup errors instead of "Error fetching updates" in panel headers - Errors when fetching are now shown with popup errors instead of "Error fetching updates" in panel headers

View file

@ -42,7 +42,8 @@
:value="index" :value="index"
> >
<label class="option-vote"> <label class="option-vote">
<div>{{ option.title }}</div> <!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="option.title_html" />
</label> </label>
</div> </div>
</div> </div>

View file

@ -280,7 +280,7 @@ export const parseStatus = (data) => {
if (output.poll) { if (output.poll) {
output.poll.options = (output.poll.options || []).map(field => ({ output.poll.options = (output.poll.options || []).map(field => ({
...field, ...field,
title_html: addEmojis(field.title, data.emojis) title_html: addEmojis(escape(field.title), data.emojis)
})) }))
} }
output.pinned = data.pinned output.pinned = data.pinned