After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779176 - be stricter about generating recipe IDs
be stricter about generating recipe IDs
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-02-24 12:55 UTC by Matthias Clasen
Modified: 2017-02-25 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2017-02-24 12:55:31 UTC
We have a function called generate_id(), which takes the recipe and author names as input and generates an ID for a new recipe. The ID is used in various places, most importantly, we use it as a style class in css that we generate. Therefore, it has to satisfy the format restrictions for css names. And we don't quite do that yet. The function has to be more strict than it currently is.

If we generate a non-compliant ID, the symptom is that the recipe tile does not show images.

An example of a broken ID is: R_Sylvia's_Bratkartoffeln_by_sylvia

The apostrophe there is what breaks it.
Comment 1 Matthias Clasen 2017-02-25 14:45:11 UTC
The css syntax is defined here: https://www.w3.org/TR/css-syntax-3/

It basically rules out ascii characters other than a-z, A-Z, 0-9 and -_ inside identifiers. Anything non-ascii is ok.