after spending 2 hours on a stupid bug i realized that it was caused by a user who input a text containing indent text, bullets etc (i’m talking about a classifieds website)
so as the output is JSON i was receiving an error..
i know this is the holy grail of the quetions but what a simple, quick&dirty solution to
clean the output form extra spece,tab space etc, so JSON is valid?
(of course would be better to clean the input first but that’s another question)
I am not sure if what you are looking for is something like HTMLPurifier?
You can try the demo.
There should be a good website for validating JSON here.
Sorry I am not native English.