jsdoc.github.io icon indicating copy to clipboard operation
jsdoc.github.io copied to clipboard

Wrong URL encode

Open ghost opened this issue 3 years ago • 0 comments

The urls will be wrong encoded. If there is for example a space character, the resulting urls will be multiple encoded, such e.g.

http://127.0.0.1:8888/doc/module-BossMaintenance%2520Vue%2520Component.html or http://127.0.0.1:8888/doc/module-BossMaintenance%252520Vue%252520Component.html

instead of

http://127.0.0.1:8888/doc/module-BossMaintenance%20Vue%20Component.html

HOTFIX: line 353 buildLink in templateHelper.js: if(fileUrl.indexOf("%25")<0){ return util.format('<a href="%s"%s>%s', encodeURI(fileUrl + fragmentString), classString, text); }else{ return util.format('<a href="%s"%s>%s', encodeURI(decodeURI(fileUrl) + fragmentString), classString, text); }

ghost avatar Apr 18 '23 09:04 ghost