Skip to content

Commit a26c3de

Browse files
author
Chad Norvell
committed
rustdoc: Remove useless escapes
1 parent 1f56852 commit a26c3de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/js/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function getSettingValue(settingName) {
2828
// This prevents an injection vulnerability where someone could plant
2929
// JS code into the localStorage value, which could be executed when
3030
// we pull it out.
31-
return current.replace(/[\s\(\)\[\]\{\}\*\"\'\`<>.:;=&|]/g,"");
31+
return current.replace(/[\s()[\]{}*"'`<>.:;=&|]/g,"");
3232
}
3333

3434
const localStoredTheme = getSettingValue("theme");

0 commit comments

Comments
 (0)