Open TechBoxGames opened 1 year ago
The error code is in lines 77, 78, 79, 133, 134 and 135 of the script. js file
The source code is: var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'].replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'])) + JSINFO['namespace'];
var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'].replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'])) + JSINFO['namespace'];
The revised code is: var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']).replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']))) + JSINFO['namespace'];
var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']).replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']))) + JSINFO['namespace'];
Note: Change JSINFO['id'] to encodeURI(JSINFO['id'])
JSINFO['id']
encodeURI(JSINFO['id'])
The error code is in lines 77, 78, 79, 133, 134 and 135 of the script. js file
The source code is:
var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'].replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(JSINFO['id'])) + JSINFO['namespace'];
The revised code is:
var pre_url = useSlash ? window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']).replace(/:/g, '/'))) + JSINFO['namespace'].replace(/:/g, '/') : window.location.href.substring(0, window.location.href.indexOf(encodeURI(JSINFO['id']))) + JSINFO['namespace'];
Note: Change
JSINFO['id']
toencodeURI(JSINFO['id'])