mirror of
https://github.com/grocy/grocy.git
synced 2026-03-27 23:29:25 +01:00
Allow German Umlauts in OOF plugin product names (fixes #2740)
This commit is contained in:
parent
ad0447497c
commit
6b18b0a7be
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user