+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
export function getUrlParameter(search: string, name: string) {
const safeName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
}
return u.toString();
}
+
+export const customEncodeURI = (path: string) => {
+ try {
+ return path.split('/').map(encodeURIComponent).join('/');
+ } catch(e) {}
+
+ return path;
+};
+
+export const customDecodeURI = (path: string) => {
+ try {
+ return path.split('%2F').map(decodeURIComponent).join('%2F');
+ } catch(e) {}
+
+ return path;
+};