changeset 127:27d6453a6209

js (websocket): fixed parsing of new HTML
author Goffi <goffi@goffi.org>
date Sat, 24 Mar 2018 11:11:37 +0100
parents 14a4c6bb4443
children 4f27ce980ced
files default/static/websocket.js
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/default/static/websocket.js	Sat Mar 24 11:10:38 2018 +0100
+++ b/default/static/websocket.js	Sat Mar 24 11:11:37 2018 +0100
@@ -61,7 +61,7 @@
                 switch (data.update_type) {
                     case 'append':
                         var template = document.createElement('template');
-                        template.innerHTML = data.html;
+                        template.innerHTML = data.html.trim();
                         new_element = template.content.firstChild;
                         selected_element.appendChild(new_element);
                         break;