We are currently upgrading our site from PHP 5.3 to 7.1 and have noticed that apostrophes in posted values are not escaped.
E.g.,
echo $_POST['surname']
//returns O\'Brady in PHP 5
//returns O'Brady in PHP 7
This causes problems for us later on when these values are used in MySQL queries.
Can anyone suggest why this is happening and is there a simple workaround for it?