From 9289b009b655e487803bb62bc04281bc8c82135b Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 4 Jan 2019 00:39:42 +0800 Subject: [PATCH 1/2] Fix missing semicolon in WebUI --- src/webui/www/private/scripts/dynamicTable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 13e133095..002cd4de5 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -1192,7 +1192,7 @@ var TorrentsTable = new Class({ break; // do nothing case CATEGORIES_UNCATEGORIZED: if (row['full_data'].category.length !== 0) - return false + return false; break; // do nothing default: if (categoryHashInt !== genHash(row['full_data'].category)) @@ -1478,7 +1478,7 @@ var SearchResultsTable = new Class({ min: minSeeds, max: maxSeeds } - } + }; var filteredRows = []; var rows = this.rows.getValues(); From a0f3678163320ac9f9d00bf96dc419a520435260 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 4 Jan 2019 00:55:04 +0800 Subject: [PATCH 2/2] Fix only the first newline char is replaced Must use regex to replace all instances of newline chars. --- src/webui/www/private/scripts/dynamicTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 002cd4de5..dd95eccfa 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -1396,7 +1396,7 @@ var TorrentPeersTable = new Class({ // files this.columns['files'].updateTd = function(td, row) { - td.innerHTML = escapeHtml(this.getRowValue(row, 0).replace('\n', ';')); + td.innerHTML = escapeHtml(this.getRowValue(row, 0).replace(/\n/g, ';')); td.title = escapeHtml(this.getRowValue(row, 0)); };