mirror of
https://github.com/grocy/grocy.git
synced 2025-08-21 04:43:32 +00:00
Allow German Umlauts in OOF plugin product names (fixes #2740)
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
### Stock
|
### 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
|
- 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
|
### Shopping list
|
||||||
|
@@ -58,7 +58,7 @@ class OpenFoodFactsBarcodeLookupPlugin extends BaseBarcodeLookupPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove non-ASCII characters in product name (whyever a product name should have them at all)
|
// 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 [
|
return [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
|
Reference in New Issue
Block a user