Observed behavior
The templates for rendering the Perseus JSON for assessment items do not escape or jsonify the designated width or height of images, e.g.
|
"width": {{ image.width }}, |
(but also true for other question types as well).
This means that in languages that do not use . as the decimal separator, and when the width and height of an image are non-integer, the rendered value will break later JSON parsing, as JSON expects . separated numbers.
Expected behavior
Should always output valid JSON regardless of the currently active translation language.
User-facing consequences
Users publishing their channels when the interface is set to Spanish or French could suffer unpredictable breakages in Kolibri.
Observed behavior
The templates for rendering the Perseus JSON for assessment items do not escape or jsonify the designated width or height of images, e.g.
studio/contentcuration/contentcuration/templates/perseus/multiple_selection.json
Line 6 in 584aabd
This means that in languages that do not use
.as the decimal separator, and when the width and height of an image are non-integer, the rendered value will break later JSON parsing, as JSON expects.separated numbers.Expected behavior
Should always output valid JSON regardless of the currently active translation language.
User-facing consequences
Users publishing their channels when the interface is set to Spanish or French could suffer unpredictable breakages in Kolibri.