diff --git a/client/coral-framework/components/AdminCommentContent.js b/client/coral-framework/components/AdminCommentContent.js index be86c26bb..b3110e822 100644 --- a/client/coral-framework/components/AdminCommentContent.js +++ b/client/coral-framework/components/AdminCommentContent.js @@ -172,9 +172,16 @@ const AdminCommentContentHTML = ({ suspectWords, bannedWords, }) => { + // We create a Shadow DOM Tree with the HTML body content and + // use it as a parser. const node = document.createElement('div'); node.innerHTML = body; + + // Then we traverse it recursively and manipulate it to highlight suspect words + // and banned words. markHTMLNode(node, suspectWords, bannedWords); + + // Finally we render the content of the Shadow DOM Tree return (