From 12d0984883552787bf4535f2ce23f563a3364d91 Mon Sep 17 00:00:00 2001 From: Nicholas Jitkoff Date: Mon, 30 May 2022 10:37:15 -0700 Subject: [PATCH] Strip = from b64 data --- netlify/edge-functions/metadata.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify/edge-functions/metadata.js b/netlify/edge-functions/metadata.js index 3e4f13a..3eb4df6 100644 --- a/netlify/edge-functions/metadata.js +++ b/netlify/edge-functions/metadata.js @@ -36,20 +36,20 @@ export default async (request, context) => { if (info.t) { content.push(``); } if (info.d) { content.push(``,``); } if (info.i) { - if (!info.i.startsWith("http")) info.i = atob(info.i); + if (!info.i.startsWith("http")) info.i = atob(info.i.replace(/=/g,'')); content.push(``); if (info.iw) content.push(``); if (info.ih) content.push(``); } if (info.v) { - if (!info.v.startsWith("http")) info.v = atob(info.v); + if (!info.v.startsWith("http")) info.v = atob(info.v.replace(/=/g,'')); content.push(``); if (info.vw) content.push(``); if (info.vh) content.push(``); } if (info.f) { if (info.f.length > 9){ - if (!info.f.startsWith("http")) info.f = atob(info.f); + if (!info.f.startsWith("http")) info.f = atob(info.f.replace(/=/g,'')); content.push(``); } else { let codepoints = Array.from(info.f).map(c => c.codePointAt(0).toString(16));