Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type
Resolves the following issues
#3193
Pull request description
When saving a field that contains field option(s) with special characters (for example a checkbox with the value: "J'accepte conformément à la clause de non-responsabilité") an AJAX error was thrown.
Encoding all characters of the values in the SaveField action fixes this issue.
But it still made the form fail validation as described in the linked issue, so I decoded the values before rendering the form to fix validation.
Not sure if this is the best way to fix this issue?
I only applied this to values & default values for now to fix functional errors, other form fields (placeholders, error messages, ...) also require a fix since for example adding the same value as placeholder shows a string with encoded characters.
Secondly I added a check to the formatRecipients function which was trying to run when no recipients are provided (when having selected the database method).