mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Fix URL strings for query parameter method
This commit is contained in:
@@ -60,16 +60,11 @@ export function shallowEqual(objA, objB) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn a base-64 encoded string in to a URL-safe version
|
||||
* @param {string} data the string
|
||||
* @return {string} the converted string
|
||||
*/
|
||||
export function toUrlSafe(data) {
|
||||
return data ? data.replace(/\//g, '-').replace(/\+/g, '_') : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn a URL-safe base-64 encoded string in to a normal version
|
||||
* Turn a URL-safe base-64 encoded string in to a normal version.
|
||||
* Coriolis used to use a different encoding system, and some old
|
||||
* data might be bookmarked or on local storage, so we keep this
|
||||
* around and use it when decoding data from the old-style URLs to
|
||||
* be safe.
|
||||
* @param {string} data the string
|
||||
* @return {string} the converted string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user