diff --git a/packages/grafana-data/src/text/sanitize.ts b/packages/grafana-data/src/text/sanitize.ts index 8fed4311627..501611aa12b 100644 --- a/packages/grafana-data/src/text/sanitize.ts +++ b/packages/grafana-data/src/text/sanitize.ts @@ -147,7 +147,7 @@ export function validatePath(path: OriginalPath): O } // Remove query params and fragments to check only the path portion - const cleaned = originalDecoded.split(/[\?&#]/)[0]; + const cleaned = originalDecoded.split(/[\?#]/)[0]; originalDecoded = cleaned; // If the original string contains traversal attempts, block it