WAF is showing some errors due to including some HTML tags in my payload responses (mostly field-like messages and user guides). Sometimes, I am also sending R programming language code to the server, which will just be stored in the database.
While doing WAF for security check, it gives a vulnerability issue saying HTML tags and code are detected.
Our team proposed a solution to encode the entire payload and decode the encoded payload in the Django middleware. But I am wondering if this is the best approach after all?
Will this approach be efficient in the long run?
Can you please suggest the right approach?