We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b61dc50 commit c363d01Copy full SHA for c363d01
src/ui/url_hash_binding.ts
@@ -129,10 +129,10 @@ export class UrlHashBinding extends RefCounted {
129
if (stateString !== this.prevStateString) {
130
this.prevStateString = stateString;
131
const userFunc = this.viewer.urlHashRateLimit.value;
132
- const safeFunc = /^[x */\+\-\d\(\)le]*$/;
+ const safeFunc = /^[xelogmaxin */\+\-\d\(\)]*$/;
133
if (safeFunc.test(userFunc)) {
134
const translatedFunc = userFunc
135
- .replaceAll("l", "Math.log")
+ .replaceAll("log", "Math.log")
136
.replaceAll("e", "Math.E");
137
this.urlHashRateLimit.value = eval(
138
`'use strict';(x) => ${translatedFunc}`,
0 commit comments