We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
=
1 parent 8999dfd commit da936f8Copy full SHA for da936f8
apps/svelte.dev/src/routes/(authed)/playground/[id]/gzip.js
@@ -6,7 +6,8 @@ export async function compress_and_encode_text(input) {
6
const { done, value } = await reader.read();
7
if (done) {
8
reader.releaseLock();
9
- return btoa(buffer).replaceAll('+', '-').replaceAll('/', '_');
+ // Some sites like discord don't like it when links end with =
10
+ return btoa(buffer).replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');
11
} else {
12
for (let i = 0; i < value.length; i++) {
13
// decoding as utf-8 will make btoa reject the string
0 commit comments