urlencode the . in a url querystring on play (#1293)

* urlencode the . in a url querystring on play

* lint

* fix for non querystring urls too

* lint
This commit is contained in:
Sam Machin
2025-07-20 19:03:21 +01:00
committed by GitHub
parent d831a4ca7f
commit bd1c763e72

View File

@@ -6,7 +6,9 @@ class TaskPlay extends Task {
super(logger, opts);
this.preconditions = TaskPreconditions.Endpoint;
this.url = this.data.url;
this.url = this.data.url.includes('?')
? this.data.url.split('?')[0] + '?' + this.data.url.split('?')[1].replaceAll('.', '%2E')
: this.data.url;
this.seekOffset = this.data.seekOffset || -1;
this.timeoutSecs = this.data.timeoutSecs || -1;
this.loop = this.data.loop || 1;