4
I have a field in the form that allows html tags. If you insert the following line into the field and submit the form, it returns error 403 Forbidden:
<span style="display: none"> </span>
But if you insert the line with simple quotes, the error no longer happens:
<span style='display: none"'> </span>
Does anyone know what’s going on?
It is not a mistake when working with the field in php, because I made a die("teste")
before any $_POST
and even then the error is returned in the first option.
UPDATE:
I changed the form action to a PHP file that contains only the code below and still returns 403 Forbidden. Does anyone have any idea what it might be?
<?php echo "teste"; ?>
UPDATE:
According to the technician, the error happens because an anti-spam server lock is activated.
Regra 300076, antispam content.
There is way around this in php, or just by turning off the rule?
Just to clarify: your goal is that the user insert content with html tags, and this content will be displayed back as html even, right? (if it is, be careful with XSS)
– mgibsonbr
@mgibsonbr this is a backoffice, so the need for html, the lock is that we do not allow the tag script.
– Filipe Moraes