From c798308e3a425eae050a1f249a576fa8c6433327 Mon Sep 17 00:00:00 2001 From: Henri Vasserman Date: Tue, 25 Jul 2023 10:27:34 +0300 Subject: [Server] Escape HTML in webchat (#2368) * escape HTML in webchat * add amp --- examples/server/public/index.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/server/public/index.html') diff --git a/examples/server/public/index.html b/examples/server/public/index.html index f5ed2d4..ea93de4 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -390,6 +390,9 @@ // poor mans markdown replacement const Markdownish = (params) => { const md = params.text + .replace(/&/g, '&') + .replace(//g, '>') .replace(/^#{1,6} (.*)$/gim, '

$1

') .replace(/\*\*(.*?)\*\*/g, '$1') .replace(/__(.*?)__/g, '$1') -- cgit v1.2.3