-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Base64 filters were added in Liquid 5.1 together with URL safe variants. There seems to be two variants out in the wild, and the question is can/should Liquid support both? base64_url_safe_decode supports both. base64_url_safe_encode does not.
- Ruby's implementation swaps
+
and/
only - Microsoft's implementations (Microsoft.IdentityModel.Tokens, System.Buffers.Text of .NET9) also remove the
=
padding.
The pad character "=" is typically percent-encoded when used in an URI, but if the data length is known implicitly, this can be avoided by skipping the padding
Mozilla defines it as
A common variant is "Base64 URL safe", which omits the padding and replaces +/
Related to dotliquid#542
Metadata
Metadata
Assignees
Labels
No labels