mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-08 16:49:01 +08:00
fix: alerts links are broken when there is a space in value (#6043)
* fix: space between values being converted as + sign in alerts generated links * fix: added inline comment * fix: added inline comment
This commit is contained in:
parent
f6d3f95768
commit
0218f701b2
@ -13,7 +13,11 @@ export const useGetCompositeQueryParam = (): Query | null => {
|
||||
try {
|
||||
if (!compositeQuery) return null;
|
||||
|
||||
parsedCompositeQuery = JSON.parse(decodeURIComponent(compositeQuery));
|
||||
// MDN reference - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#decoding_query_parameters_from_a_url
|
||||
// MDN reference to support + characters using encoding - https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams#preserving_plus_signs add later
|
||||
parsedCompositeQuery = JSON.parse(
|
||||
decodeURIComponent(compositeQuery.replace(/\+/g, ' ')),
|
||||
);
|
||||
} catch (e) {
|
||||
parsedCompositeQuery = null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user