From 839572f1fb176fa2aef9c9ebe1e8b2c4663d0418 Mon Sep 17 00:00:00 2001 From: Dillard Blom Date: Wed, 30 Sep 2026 17:34:49 +0200 Subject: [PATCH] Only treat --full as the option when it is outside string literals A value like 'value --full' in the query turned the full table view on. Leave string literals and quoted identifiers out when looking for the option. --- js/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/index.js b/js/index.js index 8483e60..d509a5c 100644 --- a/js/index.js +++ b/js/index.js @@ -356,8 +356,10 @@ askDeleteConfirmation(term, sql, response.error); return; } - // "--full" is a plain SQL comment, so the database ignores it - renderSqlResponse(term, response, /(^|\s)-- ?full\b/.test(sql)); + // "--full" is a plain SQL comment, so the database ignores it; string + // literals are left out so a value containing it doesn't count + var withoutStrings = sql.replace(/'(?:[^']|'')*'/g, "''").replace(/"(?:[^"]|"")*"/g, '""'); + renderSqlResponse(term, response, /(^|\s)-- ?full\b/.test(withoutStrings)); term.resume(); }).fail(function (xhr, status) { if (status === 'timeout') {