diff options
author | Henri Vasserman <henv@hot.ee> | 2023-07-25 10:27:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 10:27:34 +0300 |
commit | c798308e3a425eae050a1f249a576fa8c6433327 (patch) | |
tree | 3eade5ade6a698017ccf1bd325b3705027000480 /examples/server/public | |
parent | 41c674161fb2459bdf7806d1eebead15bc5d046e (diff) |
[Server] Escape HTML in webchat (#2368)
* escape HTML in webchat
* add amp
Diffstat (limited to 'examples/server/public')
-rw-r--r-- | examples/server/public/index.html | 3 |
1 files changed, 3 insertions, 0 deletions
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(/>/g, '>') .replace(/^#{1,6} (.*)$/gim, '<h3>$1</h3>') .replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>') .replace(/__(.*?)__/g, '<strong>$1</strong>') |