diff --git a/changelog/81_UNRELEASED_xxxx-xx-xx.md b/changelog/81_UNRELEASED_xxxx-xx-xx.md index fd3d86bd..bb4f7b7a 100644 --- a/changelog/81_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/81_UNRELEASED_xxxx-xx-xx.md @@ -10,6 +10,7 @@ ### Stock +- Fixed that German Umlauts were removed from product names when looking up a barcode via the built-in Open Food Facts external barcode lookup plugin - Fixed that when using/scanning a barcode on the purchase page with a note attached (which prefills the note field) and when manually selecting another product afterwards, the note of the previously used barcode was incorrectly prefilled again ### Shopping list diff --git a/plugins/OpenFoodFactsBarcodeLookupPlugin.php b/plugins/OpenFoodFactsBarcodeLookupPlugin.php index 8730740a..6225d3e7 100644 --- a/plugins/OpenFoodFactsBarcodeLookupPlugin.php +++ b/plugins/OpenFoodFactsBarcodeLookupPlugin.php @@ -58,7 +58,7 @@ class OpenFoodFactsBarcodeLookupPlugin extends BaseBarcodeLookupPlugin } // Remove non-ASCII characters in product name (whyever a product name should have them at all) - $name = preg_replace('/[^\x20-\x7E]/', '', $name); + $name = preg_replace('/[^a-zA-Z0-9äöüÄÖÜß ]/', '', $name); return [ 'name' => $name,