From 2c32608cd58de2b88a0c78c8a5ec81639c63a79e Mon Sep 17 00:00:00 2001
From: Anton Georgiev <anto.georgiev@gmail.com>
Date: Wed, 29 Jul 2020 15:09:15 -0400
Subject: [PATCH] allow for img tag in welcome and modOnly messages

---
 .../imports/api/meetings/server/modifiers/addMeeting.js     | 6 ++++--
 .../imports/ui/components/join-handler/component.jsx        | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js b/bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js
index cded1233cb..7a4b4dab7a 100755
--- a/bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js
+++ b/bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js
@@ -107,9 +107,10 @@ export default function addMeeting(meeting) {
 
   let { welcomeMsg } = newMeeting.welcomeProp;
   const sanitizedWelcomeText = SanitizeHTML(welcomeMsg, {
-    allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br'],
+    allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br', 'img'],
     allowedAttributes: {
       a: ['href', 'name', 'target'],
+      img: ['src'],
     },
   });
   welcomeMsg = sanitizedWelcomeText.replace(
@@ -133,9 +134,10 @@ export default function addMeeting(meeting) {
   const { modOnlyMessage } = newMeeting.welcomeProp;
 
   const sanitizedModOnlyText = SanitizeHTML(modOnlyMessage, {
-    allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br'],
+    allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br', 'img'],
     allowedAttributes: {
       a: ['href', 'name', 'target'],
+      img: ['src'],
     },
   });
 
diff --git a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
index e7a4444dd8..a04ea5d229 100755
--- a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
@@ -143,9 +143,10 @@ class JoinHandler extends Component {
     const setModOnlyMessage = (resp) => {
       if (resp && resp.modOnlyMessage) {
         const sanitizedModOnlyText = SanitizeHTML(resp.modOnlyMessage, {
-          allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br'],
+          allowedTags: ['b', 'strong', 'i', 'u', 'a', 'br', 'img'],
           allowedAttributes: {
             a: ['href', 'name', 'target'],
+            img: ['src'],
           },
         });
         setModeratorOnlyMessage(sanitizedModOnlyText);
-- 
GitLab