From ebd68a52656843e1f79d9ce0509a86ee080b78df Mon Sep 17 00:00:00 2001 From: zefie Date: Thu, 22 Sep 2022 15:50:29 -0400 Subject: [PATCH] add currently-unused function for possible workarounds --- zefie_wtvp_minisrv/WTVShared.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zefie_wtvp_minisrv/WTVShared.js b/zefie_wtvp_minisrv/WTVShared.js index 3a1c9464..3cdcf69a 100644 --- a/zefie_wtvp_minisrv/WTVShared.js +++ b/zefie_wtvp_minisrv/WTVShared.js @@ -38,6 +38,16 @@ class WTVShared { } } + getQueryString(query) { + // for easy retrofitting old code to work with the webtvism of allowing multiple of the same query name + // pass it the query, and it will return a string regardless. if its a string it just sends it back + // if its an array we just pull the last object + if (typeof (query) === "object") + return query[(Object.keys(query).length - 1)]; + else + return query + } + htmlEntitize(string, process_newline = false) { string = this.html_entities.encode(string).replace(/'/g, "'");