tallence / core-forms

A simple and lean formeditor for the CoreMedia CMS.
Apache License 2.0
19 stars 13 forks source link

Handle options texts with dots #92

Open timolemke opened 2 years ago

timolemke commented 2 years ago

Based on the workaround in https://github.com/tallence/core-forms/pull/90/commits/3082794c0d4da4258bdab0e9ac3512f4cbc8ed4b

Option of a fields with options (e.g. RadioButton) are serialized in the struct-property in this way:

This has historical reasons and is obviously not good: The options displayValue might contain a lot of characters and (which is the worst) might contains dots. This will lead to a bug: the whole option cannot be edited anymore.

A quick solution could be: Escaping the dot A better solution would be: serializing the displayName in a stringProperty. The old structure must still be readable, otherwise each project has to perform a content-migration...