Sanitization html output itself

The more elaborate data is, the harder it is to both formulate and implement sanitization process. For a number this might be as simple as “integer” and (int)$number. For HTML this is highly not trivial with different possibilities of desired scope (no HTML tags? some blacklisted tags? some whitelisted tags? what about embedded scripts? CSS?) … Read more

Can we validate data from jquery

Yes, you can validate data using jquery before submitting form. There is a way custom way to do that by checking the fields value length `$(document).ready(function(){ $(“#form”).submit(function(){ var field_value = $(‘input[name=”some_name”]’).val(); if(field_value.length>0){ return true; } else{ return false; } }); });` Or you can use a jquery validation library. https://jqueryvalidation.org/