1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 02:20:28 +00:00
TiddlyWiki5/editions
Robin Munn 326ae61929
Fix encodebase64 and decodebase64 filters (#7683)
* Fix encodebase64 and decodebase64 filters

The documentation for encodebase64 says that the input is treated as
binary data, but in fact the input is being treated as text data, with
an extra UTF-8 encoding step being performed first.

Likewise, the decodebase64 documentation says that it outputs binary
data, but in fact it will do a UTF-8 decoding step before producing
output, which will in fact garble binary data.

This commit changes the behavior of encodebase64 and decodebase64 to
match what the documentation says they do. It also adds an optional
`text` suffix to both filters to keep the current behavior.

Finally, an optional `urlsafe` suffix is added to both filters to allow
them to use the "URL-safe" variant of base64 (using `-` instead of `+`
and `_` instead of `/`).

* Try to fix failing test

Turns out a little more than this is going to be needed.

* Fix binary base64 encoding, including unit tests

* Update base64 filter documentation

* Can't use replaceAll, too new

Have to use String.replace with a global regex instead

* Replace uses of window.btoa() in rest of code

Since window.btoa() is not available under Node.js, we'll replace all
uses of it with the $tw.utils.base64encode() function that now works
correctly for binary data.

* Add link to UTF-8 glossary definition at MDN
2023-10-18 16:08:56 +01:00
..
aws Add first release of AWS plugin 2017-07-03 20:34:58 +01:00
classicparserdemo Use https for YouTube 2017-11-18 19:53:52 +00:00
codemirrordemo Add default "tiddlywiki" styles to CodeMirror and Highlight.js (#5128) 2020-11-28 14:07:12 +00:00
d3demo Use British English (#7180) 2023-01-12 20:59:34 +00:00
de-AT Update New Release Banner filename 2023-07-01 12:59:42 +01:00
de-AT-server Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
de-DE Clean up build errors 2023-01-17 23:13:58 +00:00
dev Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
dynaviewdemo Introduce $:/tags/Global tag 2023-05-09 15:46:54 +01:00
empty Fix broken render commands 2023-09-30 13:30:31 +01:00
es-ES Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
es-ES-server Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
fr-FR Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
fr-FR-server Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
full Remove erroneous references to en-GB language plugin 2022-12-13 09:36:10 +00:00
highlightdemo Fix broken render commands 2023-09-30 13:30:31 +01:00
innerwikidemo Fix bug with innerwiki template 2021-10-02 16:17:07 +01:00
introduction Minor fixes for introduction edition 2023-06-01 15:30:17 +01:00
ja-JP Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
katexdemo Fix broken render commands 2023-09-30 13:30:31 +01:00
ko-KR Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
ko-KR-server Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
markdowndemo Merge branch 'tiddlywiki-com' 2023-01-15 18:46:46 +00:00
pluginlibrary Fix edition file formatting inconsistencies (#7738) 2023-09-13 15:12:49 +01:00
prerelease Update release note 2023-10-16 12:27:56 +01:00
resumebuilder Fix edition file formatting inconsistencies (#7738) 2023-09-13 15:12:49 +01:00
server Fix broken render commands 2023-09-30 13:30:31 +01:00
server-external-js Fix broken render commands 2023-09-30 13:30:31 +01:00
share Fix accidental changes in 41a7d98e17 2020-06-07 10:30:39 +01:00
tahoelafs First pass at an --editions command 2014-10-27 21:50:25 +00:00
test Fix encodebase64 and decodebase64 filters (#7683) 2023-10-18 16:08:56 +01:00
testcommonjs First pass at an --editions command 2014-10-27 21:50:25 +00:00
text-slicer Major updates to text-slicer plugin 2017-12-14 14:16:54 +00:00
translators Remove erroneous references to en-GB language plugin 2022-12-13 09:36:10 +00:00
tw5.com Fix encodebase64 and decodebase64 filters (#7683) 2023-10-18 16:08:56 +01:00
tw5.com-docs Convert Rendertiddler(s) Command in Sever TiddlyWIki.info (#7124) 2022-12-23 22:42:25 +00:00
tw5.com-server Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
tw5tank Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
tw5tiddlyweb Typos 2014-12-05 10:20:32 +00:00
tw.org Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
twitter-archivist Convert Rendertiddler(s) Command in Sever TiddlyWIki.info (#7124) 2022-12-23 22:42:25 +00:00
upgrade First pass at an --editions command 2014-10-27 21:50:25 +00:00
xlsx-utils xlsx-utils: Fix demo spreadsheet 2021-01-16 16:09:42 +00:00
xlsx-utils-server Add first pass at XLSX Utilities plugin 2016-10-23 22:49:59 +01:00
zh-Hans Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00
zh-Hant Change favicon format from ICO to PNG, fix #7665 (#7671) 2023-10-04 22:15:23 +01:00