Closed OliverRC closed 10 years ago
I'm not sure about this. I don't really think it's a good idea to start including other encodings that are outside the narrow scope of the library. Is there any reason that you can't just do encodeURIComponent($base64.encode('whatever'))
?
I'll take a look.
On Mon, Apr 21, 2014 at 5:52 PM, Pete Martin notifications@github.comwrote:
I'm not sure about this. I don't really think it's a good idea to start including other encodings that are outside the narrow scope of the library. Is there any reason that you can't just do encodeURIComponent($base64.encode('whatever'))?
— Reply to this email directly or view it on GitHubhttps://github.com/ninjatronic/angular-base64/pull/4#issuecomment-40946095 .
@ninjatronic That worked for me. On the flip side, when decoding, I just used $base64.decode(decodeURIComponent('encodedWhatever'))
Thanks.
Glad these work for you
See fe4a2499f4505ded31d3f196ffe923cc9e4c4a9a
I am using your bower package to do some JWT authentication in Angular. Part of the JWT spec is to do base64 Url encoding which means removing some non-url safe characters from the base64 encoded string.
I've added these methods.