From 1b25d104841eef7c1a288cb7769e709b3109e8f2 Mon Sep 17 00:00:00 2001 From: Haku Date: Fri, 23 Jun 2017 09:01:37 +0800 Subject: [PATCH 1/2] Update main.js Fix the cleanInput() function to prevent input from having injected markup. --- examples/chat/public/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chat/public/main.js b/examples/chat/public/main.js index dc1721be99..0a942dce08 100644 --- a/examples/chat/public/main.js +++ b/examples/chat/public/main.js @@ -146,7 +146,7 @@ $(function() { // Prevents input from having injected markup function cleanInput (input) { - return $('
').text(input).text(); + return $('
').html(input).text(); } // Updates the typing event From fa79de33721d86a4936dd1f85632f38096a12869 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Sun, 27 Aug 2017 08:39:07 +0200 Subject: [PATCH 2/2] Update main.js --- examples/chat/public/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chat/public/main.js b/examples/chat/public/main.js index 0a942dce08..83d142825a 100644 --- a/examples/chat/public/main.js +++ b/examples/chat/public/main.js @@ -146,7 +146,7 @@ $(function() { // Prevents input from having injected markup function cleanInput (input) { - return $('
').html(input).text(); + return $('
').text(input).html(); } // Updates the typing event