From 6cda8e6dabd6e3dbc93882a2a6f99662b75b7786 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 9 Jul 2018 11:09:57 +0200 Subject: luci-base: cbi.js: avoid setting empty cell title attributes Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/luci-base/htdocs/luci-static/resources/cbi.js') diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 74b275742c..ddbff83418 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -2081,10 +2081,10 @@ function cbi_update_table(table, data, placeholder) { var trow = E('div', { 'class': 'tr' }); for (var i = 0; i < titles.length; i++) { - var text = titles[i].innerText; + var text = (titles[i].innerText || '').trim(); var td = trow.appendChild(E('div', { 'class': titles[i].className, - 'data-title': text ? text.trim() : null + 'data-title': (text !== '') ? text : null }, row[i] || '')); td.classList.remove('th'); -- cgit v1.2.3