File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,10 @@ const ENC_PIPE = '%7C'
165
165
*
166
166
* This percent encode the special character | used to separate external layer parameters.
167
167
*
168
+ * NOTE: We don't use encodeURIComponent here because the Vue Router will anyway do the
169
+ * encodeURIComponent() therefore by only encoding | we avoid to encode other special character
170
+ * twice. But we need to encode | twice to avoid layer parsing issue.
171
+ *
168
172
* @param {string } param Parameter to encode
169
173
* @returns {string } Percent encoded parameter
170
174
*/
@@ -177,6 +181,10 @@ export function encodeExternalLayerParam(param) {
177
181
*
178
182
* This percent decode the special character | used to separate external layer parameters.
179
183
*
184
+ * NOTE: We don't use decodeURIComponent here because the Vue Router will anyway do the
185
+ * decodeURIComponent() therefore by only decoding | we avoid to decode other special character
186
+ * twice. But we need to decode | twice to avoid layer parsing issue.
187
+ *
180
188
* @param {string } param Parameter to encode
181
189
* @returns {string } Percent encoded parameter
182
190
*/
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ const ENC_AT = '%40'
10
10
*
11
11
* This percent encode the special character , ; and @ used to separate layer parameters.
12
12
*
13
+ * NOTE: We don't use encodeURIComponent here because the Vue Router will anyway do the
14
+ * encodeURIComponent() therefore by only encoding the layer parameter separators we avoid to encode
15
+ * other special character twice. But we need to encode them twice to avoid layer parsing issue.
16
+ *
13
17
* @param {string } param Parameter to encode
14
18
* @returns {string } Percent encoded parameter
15
19
*/
@@ -22,6 +26,10 @@ export function encodeLayerParam(param) {
22
26
*
23
27
* This percent decode the special character , ; and @ used to separate layer parameters.
24
28
*
29
+ * NOTE: We don't use encodeURIComponent here because the Vue Router will anyway do the
30
+ * encodeURIComponent() therefore by only encoding the layer parameter separators we avoid to encode
31
+ * other special character twice. But we need to encode them twice to avoid layer parsing issue.
32
+ *
25
33
* @param {string } param Parameter to encode
26
34
* @returns {string } Percent encoded parameter
27
35
*/
You can’t perform that action at this time.
0 commit comments