-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreateContentTask evaluation will not remove illegal characters #16542
Comments
I think this is due to the extra trailing comma in your json. |
Is it matter? |
trailing command makes the json invalid by default. |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
If the liquid is generated from a generic liquid task, then it doesn't know that the properties should be encoded in JSON. What may happen in 2.0 is that the parser won't be as permissive as before (NewtonSoft.JSON) and will fail when it finds an invalid char. The solution, which will also work with the previous version is to correctly encode the values using the
|
Feel free to re-open if you have more information that would invalidate the explanation |
@sebastienros @MikeAlhayek adding this to remove whitespaces from left and right fixes it :
|
But you should also add the json filters. Try with a name containing a double quote. It could be a security issue otherwise |
While upgrading to 2.0 i had a workflow with a CreateContentTask activity to create a specific content type with following liquid expression :
when ContentProperties is evaluated from :
the json to be merged is returned like this (with carriage return inside the json) :
this results in the following error when merging with content item :
This was handeled automatically before 2.0 . Is there a way to remove automatically invalid json characters like previous ?
The text was updated successfully, but these errors were encountered: