diff --git a/app/javascript/mastodon/actions/importer/index.js b/app/javascript/mastodon/actions/importer/index.js
index abadee8173fa84..e990dc04cb6a57 100644
--- a/app/javascript/mastodon/actions/importer/index.js
+++ b/app/javascript/mastodon/actions/importer/index.js
@@ -1,4 +1,4 @@
-import { normalizeAccount, normalizeStatus } from './normalizer';
+import { normalizeAccount, normalizeStatus, normalizePoll } from './normalizer';
export const ACCOUNT_IMPORT = 'ACCOUNT_IMPORT';
export const ACCOUNTS_IMPORT = 'ACCOUNTS_IMPORT';
@@ -71,7 +71,7 @@ export function importFetchedStatuses(statuses) {
}
if (status.poll && status.poll.id) {
- pushUnique(polls, status.poll);
+ pushUnique(polls, normalizePoll(status.poll));
}
}
diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js
index 3085cd53779ed6..ea80c0efb395b6 100644
--- a/app/javascript/mastodon/actions/importer/normalizer.js
+++ b/app/javascript/mastodon/actions/importer/normalizer.js
@@ -67,3 +67,14 @@ export function normalizeStatus(status, normalOldStatus) {
return normalStatus;
}
+
+export function normalizePoll(poll) {
+ const normalPoll = { ...poll };
+
+ normalPoll.options = poll.options.map(option => ({
+ ...option,
+ title_emojified: emojify(escapeTextContentForBrowser(option.title)),
+ }));
+
+ return normalPoll;
+}
diff --git a/app/javascript/mastodon/components/poll.js b/app/javascript/mastodon/components/poll.js
index 182491af865fb4..c52445c86f0bfc 100644
--- a/app/javascript/mastodon/components/poll.js
+++ b/app/javascript/mastodon/components/poll.js
@@ -120,7 +120,7 @@ class Poll extends ImmutablePureComponent {
{!showResults && }
{showResults && {Math.round(percent)}%}
- {option.get('title')}
+
);