Skip to content

Commit d3cf44a

Browse files
pseidemannavelad
authored andcommitted
docs: fix use of encodeURIComponent() in fairplay tutorial (#6018)
1 parent 61d5298 commit d3cf44a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorials/fairplay.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ player.getNetworkingEngine().registerRequestFilter((type, request, context) => {
9898
const originalPayload = new Uint8Array(request.body);
9999
const base64Payload =
100100
shaka.util.Uint8ArrayUtils.toStandardBase64(originalPayload);
101-
const params = 'spc=' + base64Payload;
101+
const params = 'spc=' + encodeURIComponent(base64Payload);
102102
request.headers['Content-Type'] = 'application/x-www-form-urlencoded';
103-
request.body = shaka.util.StringUtils.toUTF8(encodeURIComponent(params));
103+
request.body = shaka.util.StringUtils.toUTF8(params);
104104
});
105105

106106
player.getNetworkingEngine().registerResponseFilter((type, response, context) => {

0 commit comments

Comments
 (0)