From e80a41ca727ff858e5a1a49b0d991a71e815d0f3 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 12 Jan 2024 10:26:06 -0500 Subject: [PATCH] [skip ci] various small changes --- docs/canary-changelog.md | 5 ++--- playlet-lib/src/source/services/HttpClient.bs | 14 -------------- playlet-lib/src/source/services/XmlObject.bs | 17 +++++------------ 3 files changed, 7 insertions(+), 29 deletions(-) diff --git a/docs/canary-changelog.md b/docs/canary-changelog.md index e7a64b2b..5d581b5d 100644 --- a/docs/canary-changelog.md +++ b/docs/canary-changelog.md @@ -4,8 +4,7 @@ This is an automated release. It is generated when new code is pushed to the mai To test this release: -- Open Playlet web app in a browser (`http://ROKU_IP_ADDRESS:8888/index.html`) -- Go to settings, and scroll down to `Developer settings` -- Set `Playlet Library version` to `canary` and click `Apply` +- Open Playlet web app settings in a browser (`http://ROKU_IP_ADDRESS:8888/index.html#settings`) +- Scroll down to `Developer settings` and set `Playlet Library version` to `canary` and click `Apply` - Restart Playlet - You can verify that you're testing the `canary` release in the `Info` tab in Playlet or the web app diff --git a/playlet-lib/src/source/services/HttpClient.bs b/playlet-lib/src/source/services/HttpClient.bs index b93db165..8c381d5a 100644 --- a/playlet-lib/src/source/services/HttpClient.bs +++ b/playlet-lib/src/source/services/HttpClient.bs @@ -113,20 +113,6 @@ namespace HttpClient return (new HttpRequest()).Method("HEAD").Url(url) end function - function FromObject(obj as object) as HttpRequest - request = new HttpRequest() - - for each key in obj - if IsFunction(request[key]) - request[key](obj[key]) - else - throw `Invalid key: "${key}" in object passed to HttpClient.FromObject` - end if - end for - - return request - end function - class HttpRequest public urlTransfer as object diff --git a/playlet-lib/src/source/services/XmlObject.bs b/playlet-lib/src/source/services/XmlObject.bs index 90c8343c..6fc34674 100644 --- a/playlet-lib/src/source/services/XmlObject.bs +++ b/playlet-lib/src/source/services/XmlObject.bs @@ -7,15 +7,6 @@ class XmlObject private INDENT_SIZE = 2 - function new() - m.escapeChars = {} - m.escapeChars["&"] = "&" - m.escapeChars["<"] = "<" - m.escapeChars[">"] = ">" - m.escapeChars[`"`] = `"` - m.escapeChars["'"] = "'" - end function - function Node(name as string, attributes = invalid as object) as boolean newNode = { name: name @@ -92,9 +83,11 @@ class XmlObject end function function XmlEscape(input as string) as string - for each escChar in m.escapeChars - input = input.replace(escChar, m.escapeChars[escChar]) - end for + input = input.replace("&", "&") + input = input.replace("<", "<") + input = input.replace(">", ">") + input = input.replace(`"`, """) + input = input.replace("'", "'") return input end function