Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: improving DEBASE so it can decode URL safe Base64 variant input…
… even without using a /url refinement relates to: metaeducation/rebol-issues#2318 Previously this would throw an error: ``` >> debase "qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA==" ** Script error: data not in correct format: "qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA==" ``` The reason is that the input is using URL safe alphabet. With this commit when such a situation is detected, the decoder restarts itself automatically as if it would be used with /url refinement. NOTE: if you are sure that input should be in URL safe format, use the refinement to avoid unnecessary computations. Possible test: ``` key: "qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA==" equal? (debase key) (debase/url key) ;== should be TRUE ```
- Loading branch information