fix: Fixes importing url encoded recipe deeplinks (#3446)

This commit is contained in:
Jarrod Sibbison
2025-07-18 05:17:07 +10:00
committed by GitHub
parent fc40ed25ec
commit c69d1e9f8d

View File

@@ -158,7 +158,8 @@ export default function RecipesView({ onLoadRecipe }: RecipesViewProps = {}) {
if (!configBase64) {
throw new Error('No recipe configuration found in deeplink');
}
const configJson = Buffer.from(configBase64, 'base64').toString('utf-8');
const urlDecoded = decodeURIComponent(configBase64);
const configJson = Buffer.from(urlDecoded, 'base64').toString('utf-8');
const recipe = JSON.parse(configJson) as Recipe;
if (!recipe.title || !recipe.description || !recipe.instructions) {