about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-06-25 14:45:14 +0200
committerThibaut Girka <thib@sitedethib.com>2019-06-26 23:19:26 +0200
commit5c3171e8ea65f711137c744deb6d9f4846ba6cec (patch)
treef844b04c18266d3d3653c828f1c710b86e3884dc /app/javascript/flavours/glitch
parentaaec64a500346502aedefff446f1d8688ac5077c (diff)
[Glitch] Apply filters to poll options in WebUI
Port 47ef4a6c7a74072daff8b23c4af3e300bb75ba1a to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/actions/importer/normalizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js
index a8c3fe16a..c19ca8265 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -55,7 +55,7 @@ export function normalizeStatus(status, normalOldStatus) {
     normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');
   } else {
     const spoilerText   = normalStatus.spoiler_text || '';
-    const searchContent = [spoilerText, status.content].join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
+    const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
     const emojiMap      = makeEmojiMap(normalStatus);
 
     normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;