-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to encode a string url-safe with to_base64
#384
Comments
https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html I am not sure how to adjust the code to change the function by option |
metafacture-fix/metafix/src/main/java/org/metafacture/metafix/FixMethod.java Lines 680 to 685 in 3bb2b28
@dr0i could you help? you introduced options to url_encode too. Maybe you have an idea. This should be introduced before the next release. |
Hm, not sure where your problem is. You can extract (using regex or so) the part of the URL you need to |
Nope, that is not what I needed. |
output is:
url-safe should be: { See the underscore |
Ah: you don't mean:
but you mean: Mind 'would vs |
yes, exactly we would need optionally metafacture-fix/metafix/src/main/java/org/metafacture/metafix/FixMethod.java Lines 680 to 685 in 3bb2b28
that we can do this: default |
to_base64
Yeah, no, not instead_of , but as an option, as you said. It's not an |
I added the adverb "optionally" and "for that" :) I do not know how to write the code that when the option |
In context of OERSI we need to encode a string URL-safe to base64 (Base64url format) to reuse it later in an URL.
https://www.youtube.com/watch?v=daLgsPSvD9A
to_base64
=>aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kYUxnc1BTdkQ5QQ==
but url-safe would be:
aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj1kYUxnc1BTdkQ5QQ==
To enable url-safe base64 there should be an option in the to_base64 function.
like this:
to_base64("targetElement", url-safe:"true")
The text was updated successfully, but these errors were encountered: