h5p/h5p-cli

Default value check is too greedy and raises issues in practice

Opened this issue · 0 comments

In

h5p-cli/assets/utils/h5p.js

Lines 1021 to 1023 in b2667b3

if (languageCodes.indexOf(value.toLowerCase()) !== -1) { // language codes
return true;
}

default fields that contain one of the language codes only will be purged. This is too greedy and also hits the simple English word "No" that happens to occur in GameMap as a translatable word, cmp. https://github.com/otacke/h5p-game-map/blob/master/semantics.json#L1065