Skip to content

Use NightscoutUtils.constructURL for the Nightscout web viewer URL#712

Merged
marionbarker merged 1 commit into
devfrom
feature/webview-construct-url
Jul 19, 2026
Merged

Use NightscoutUtils.constructURL for the Nightscout web viewer URL#712
marionbarker merged 1 commit into
devfrom
feature/webview-construct-url

Conversation

@bjorkert

Copy link
Copy Markdown
Member

The Nightscout web viewer built its URL by concatenating the token onto the base URL without any encoding, so a token containing characters like & or = would be silently mangled. It now goes through NightscoutUtils.constructURL, which percent-encodes the token. For a normal token the resulting URL is identical to before.

constructURL also skips assigning queryItems when there is nothing to add, so a setup without a token no longer gets a stray trailing question mark.

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve from code review and test

@marionbarker
marionbarker merged commit b752eac into dev Jul 19, 2026
1 check passed
@marionbarker
marionbarker deleted the feature/webview-construct-url branch July 19, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants