From: Jo-Philipp Wich Date: Mon, 9 Jul 2018 09:09:57 +0000 (+0200) Subject: luci-base: cbi.js: avoid setting empty cell title attributes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6cda8e6dabd6e3dbc93882a2a6f99662b75b7786;p=project%2Fluci.git luci-base: cbi.js: avoid setting empty cell title attributes Signed-off-by: Jo-Philipp Wich --- 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');