css content property issue on ace editor
Hi!
When I use the content property of CSS on the Ace editor like this:
.caption-wrap .line-5 a:nth-child(1):after { content:"\f005"; }
And save, it set automatically to:
.caption-wrap .line-5 a:nth-child(1):after { content:"f005"; }
it adds extra dash before quotes ( an remove my dash..). I have to escape quotes? how? o is an editor issue?
Thanks in advance!
https://github.com/ReduxFramework/redux-framework/blob/master/CONTRIBUTING.md
Whatever is doing this is happening before the css validation, and saving as such to the database. @Dovy may have a better idea if it's the editor itself or some tricksy thing in the core. If there is, I can;t find it.
Experienced this first time I used redux,
I was able to avoid this issue by disabling the css validator, removing 'validate' => 'css' on field array
Confirmed. Remove the 'validate' => 'css' line, and it'll save properly. If you have the ACE editor set to CSS mode, it should catch bad CSS before saving and give you and X image where the bad CSS is.
it works if I remove 'validate' => 'css', but I want to validate the css... this solution doesn't seems to be the best.
All out validate class does is run the returned string through the wp_filter_nohtml_kses function. That's it. Since it's not properly dealing with the quotes in the string, commenting it out would be the exact same thing as not using the validation to begin with. So, pick your solution, they're both the same.