mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
390408b1ce
* fixes incorrect decoding for alert rules with % characters * Patch history package to stop decoding path * Rename rule id extraction function, update tests * Fix patch file * Fix copyFrom parameter encoding * Fix conflict commit * Fix test --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com> Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
64 lines
2.1 KiB
Diff
64 lines
2.1 KiB
Diff
diff --git a/cjs/history.js b/cjs/history.js
|
|
index fcd8ebab613c6d87b9ac824feb30ab1080cf0ef2..4df20d5cb2f9ba5fc8777899aada53f49399560b 100644
|
|
--- a/cjs/history.js
|
|
+++ b/cjs/history.js
|
|
@@ -103,16 +103,6 @@ function createLocation(path, state, key, currentLocation) {
|
|
if (state !== undefined && location.state === undefined) location.state = state;
|
|
}
|
|
|
|
- try {
|
|
- location.pathname = decodeURI(location.pathname);
|
|
- } catch (e) {
|
|
- if (e instanceof URIError) {
|
|
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
|
- } else {
|
|
- throw e;
|
|
- }
|
|
- }
|
|
-
|
|
if (key) location.key = key;
|
|
|
|
if (currentLocation) {
|
|
diff --git a/esm/history.js b/esm/history.js
|
|
index df67820fe3eed558c44fca07a82b0cd409d46720..e0e0d4f69a407e8de782b3fdf8297d42708e110a 100644
|
|
--- a/esm/history.js
|
|
+++ b/esm/history.js
|
|
@@ -80,16 +80,6 @@ function createLocation(path, state, key, currentLocation) {
|
|
if (state !== undefined && location.state === undefined) location.state = state;
|
|
}
|
|
|
|
- try {
|
|
- location.pathname = decodeURI(location.pathname);
|
|
- } catch (e) {
|
|
- if (e instanceof URIError) {
|
|
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
|
- } else {
|
|
- throw e;
|
|
- }
|
|
- }
|
|
-
|
|
if (key) location.key = key;
|
|
|
|
if (currentLocation) {
|
|
diff --git a/umd/history.js b/umd/history.js
|
|
index 80e4ff66c44a2a71d4f842cc05a252e48dd18e9a..f8f4901be95e48c66f5626fbf051747a2ffbe41d 100644
|
|
--- a/umd/history.js
|
|
+++ b/umd/history.js
|
|
@@ -207,16 +207,6 @@
|
|
if (state !== undefined && location.state === undefined) location.state = state;
|
|
}
|
|
|
|
- try {
|
|
- location.pathname = decodeURI(location.pathname);
|
|
- } catch (e) {
|
|
- if (e instanceof URIError) {
|
|
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
|
- } else {
|
|
- throw e;
|
|
- }
|
|
- }
|
|
-
|
|
if (key) location.key = key;
|
|
|
|
if (currentLocation) {
|