mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
11 lines
377 B
TypeScript
11 lines
377 B
TypeScript
/**
|
|
* use this to make a Base64 encoded string URL friendly,
|
|
* i.e. '+' and '/' are replaced with special percent-encoded hexadecimal sequences
|
|
*
|
|
* @param {String} str the encoded string
|
|
* @returns {String} the URL friendly encoded String
|
|
*/
|
|
export function Base64EncodeUrl(str): string {
|
|
return str.replace(/\+/g, '%2B').replace(/\//g, '%2F').replace(/\=/g, '%3D');
|
|
}
|