From dbc01f2b54c4df597da172e6ee8280fc194387af Mon Sep 17 00:00:00 2001 From: Thomas De Bock Date: Fri, 18 Sep 2020 11:51:27 +0200 Subject: [PATCH] Parse `%20` as spaces before printing them --- authn/openid.index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/authn/openid.index.js b/authn/openid.index.js index 8954e75..7614504 100644 --- a/authn/openid.index.js +++ b/authn/openid.index.js @@ -294,8 +294,8 @@ function unauthorized(error, error_description, error_uri, callback) { `; - page = page.replace(/%error%/g, encodeURI(error)); - page = page.replace(/%error_description%/g, encodeURI(error_description)); + page = page.replace(/%error%/g, encodeURI(error).replace(/%20/g,' ')); + page = page.replace(/%error_description%/g, encodeURI(error_description).replace(/%20/g,' ')); page = page.replace(/%error_uri%/g, encodeURI(error_uri)); // Unauthorized access attempt. Reset token and nonce cookies