use decodeURIComponent() to get ID from URL hash

This commit is contained in:
thawk authored and Henrik Ingo committed 2021-08-03 13:22:23 +03:00
1 parent 63dba5f128
commit 4bceee7fd2
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -1204,7 +1204,8 @@
// Get id from url # by removing `#` or `#/` from the beginning,
// so both "fallback" `#slide-id` and "enhanced" `#/slide-id` will work
return byId( window.location.hash.replace( /^#\/?/, "" ) );
var encoded = window.location.hash.replace( /^#\/?/, "" );
return byId( decodeURIComponent( encoded ) );
};
// `getUrlParamValue` return a given URL parameter value if it exists