Skip to content

Commit 21c96f9

Browse files
committed
fix sonarqube findings
1 parent a601cf6 commit 21c96f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/event-handler/src/http/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const PARAM_PATTERN = /:([a-zA-Z_]\w*)(?=\/|$)/g;
8686

8787
const SAFE_CHARS = "-._~()'!*:@,;=+&$";
8888

89-
const UNSAFE_CHARS = '%<> \\[\\]{}|^';
89+
const UNSAFE_CHARS = String.raw`%<> \[\]{}|^`;
9090

9191
/**
9292
* Default CORS configuration

packages/event-handler/src/http/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { handlerResultToWebResponse } from './converters.js';
3636
import type { Router } from './Router.js';
3737

3838
export function getPathString(path: Path): string {
39-
return isString(path) ? path : path.source.replaceAll(/\\\//g, '/');
39+
return isString(path) ? path : path.source.replaceAll(String.raw`\/`, '/');
4040
}
4141

4242
export function compilePath(path: Path): CompiledRoute {

0 commit comments

Comments
 (0)