-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
If you create a radio field with label or values containing characters other than A–Z and 0–9 there’s a risk they will get mixed up because å, ä, ö and such characters are removed in the conditional logic, namely in this part of the admin JS code:
modularity-form-builder/source/js/admin/conditional-admin.js
Lines 101 to 108 in add348e
| Conditional.prototype.conditionalString = function(string) { | |
| string = string.toLowerCase(); | |
| string = string.replace(/\s+/g, '_'); | |
| string = string.replace(/[^a-z0-9_]+/ig, ''); | |
| string = string.replace(/_+$/, ''); | |
| return string; | |
| }; |
This means that the editor needs to be careful not to create fields with labels or values that can get mixed up. It would be better if something matching Wordpress’ sanitize_title was used for the labels or that both labels and values are used as-is (or escaped) so that no information is lost.
Metadata
Metadata
Assignees
Labels
No labels