From d41c9a717ca3f52b0a67bbb2b0ab8b0c898bba4b Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 14 Jun 2020 13:16:08 +0200 Subject: [PATCH] Polls: Construct an html field during normalization. --- src/components/poll/poll.vue | 8 +++++++- .../entity_normalizer/entity_normalizer.service.js | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index 56e91cca..28f90006 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -17,7 +17,7 @@ {{ percentageForOption(option.votes_count) }}% - {{ option.title }} +
{ output.summary_html = addEmojis(escape(data.spoiler_text), data.emojis) output.external_url = data.url output.poll = data.poll + if (output.poll) { + output.poll.options = (output.poll.options || []).map(field => { + field.title_html = addEmojis(field.title, data.emojis) + return field + }) + } output.pinned = data.pinned output.muted = data.muted } else {