+// 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) => {
+ return encodeURIComponent(path.replace(/%2F/g, '/'));
+};
+
+export const customDecodeURI = (path: string) => {
+ return decodeURIComponent(path.replace(/\//g, '%2F'));
+};
+
+export const encodeHash = (path: string) => {
+ return path.replace(/#/g, '%23');
+};
\ No newline at end of file