Skip to content

Fix for Latin Names #289

@gustavocs97

Description

@gustavocs97

Problem:

  • Names coming from sources like OpenFoodFacts may contain HTML entities (e.g. é, ú).
  • As a result, the name parameter in the Grocy URL becomes:
    Bebida%20energ%26eacute%3Btica%20..., and Grocy receives é instead of é.

Fix:

  • Replace htmlspecialchars_decode with html_entity_decode and specify UTF-8:

At: https://github.com/Forceu/barcodebuddy/blob/master/index.php
Line: 395

SOLUTION

- rawurlencode(htmlspecialchars_decode($item['name'], ENT_QUOTES))
+ rawurlencode(html_entity_decode($item['name'], ENT_QUOTES, 'UTF-8'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions