http://php.net/manual/it/function.preg-quote.php

codice:
$TESTO_NOTE = preg_quote($TESTO_NOTE);