I'm having a hard time understanding why html tags are being stripped from an ajax call but here's very simple code and screenshots to match:
JS
function submitForm()
{
var data = { description: '<b>Something</b>' };
$.ajax({
type: 'POST',
url: '/edit',
data: data,
success: function(data) {
console.log(data);
}
});
}
PHP
public function edit()
{
var_dump($_POST['description']);exit;
}
HEADERS SCREENSHOT
RESPONSE SCREENSHOT
Does anyone know why the response does not show the <b></b>
tag that's in the header?
Try $f3->scrub($_POST,'p; br; span; div; b; a');