Browse Source

[Glitch] Apply filters to poll options in WebUI

Port 47ef4a6c7a to glitch-soc
closed-social-glitch-2
ThibG 5 years ago
committed by Thibaut Girka
parent
commit
5c3171e8ea
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/actions/importer/normalizer.js

+ 1
- 1
app/javascript/flavours/glitch/actions/importer/normalizer.js View File

@ -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;

Loading…
Cancel
Save