GNOME Bugzilla – Bug 779176
be stricter about generating recipe IDs
Last modified: 2017-02-25 15:08:40 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.
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.