From 08a87a7784eb44ee668cfefead785e1efa0a7209 Mon Sep 17 00:00:00 2001
From: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
Date: Thu, 17 Jun 2021 20:40:46 +0900
Subject: [PATCH] remove linefeed for polling option

---
 bigbluebutton-html5/imports/ui/components/poll/service.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bigbluebutton-html5/imports/ui/components/poll/service.js b/bigbluebutton-html5/imports/ui/components/poll/service.js
index a50f1c122e..55ba5ef704 100644
--- a/bigbluebutton-html5/imports/ui/components/poll/service.js
+++ b/bigbluebutton-html5/imports/ui/components/poll/service.js
@@ -147,14 +147,14 @@ const getPollResultString = (pollResultData, intl) => {
 const matchYesNoPoll = (yesValue, noValue, contentString) => {
   const ynPollString = `(${yesValue}\\s*\\/\\s*${noValue})|(${noValue}\\s*\\/\\s*${yesValue})`;
   const ynOptionsRegex = new RegExp(ynPollString, 'gi');
-  const ynPoll = contentString.match(ynOptionsRegex) || [];
+  const ynPoll = contentString.replace(/\n/g,'').match(ynOptionsRegex) || [];
   return ynPoll;
 }
 
 const matchYesNoAbstentionPoll = (yesValue, noValue, abstentionValue, contentString) => {
   const ynaPollString = `(${yesValue}\\s*\\/\\s*${noValue}\\s*\\/\\s*${abstentionValue})|(${yesValue}\\s*\\/\\s*${abstentionValue}\\s*\\/\\s*${noValue})|(${abstentionValue}\\s*\\/\\s*${yesValue}\\s*\\/\\s*${noValue})|(${abstentionValue}\\s*\\/\\s*${noValue}\\s*\\/\\s*${yesValue})|(${noValue}\\s*\\/\\s*${yesValue}\\s*\\/\\s*${abstentionValue})|(${noValue}\\s*\\/\\s*${abstentionValue}\\s*\\/\\s*${yesValue})`;
   const ynaOptionsRegex = new RegExp(ynaPollString, 'gi');
-  const ynaPoll = contentString.match(ynaOptionsRegex) || [];
+  const ynaPoll = contentString.replace(/\n/g,'').match(ynaOptionsRegex) || [];
   return ynaPoll;
 }
 
-- 
GitLab