UPDATE : the answer below was, to my knowledge, correct at the time of writing. The fact is that mysql_real_escape_string is not safe and never was. You should always use prepared statements instead.
mysql_ * , 7 . .
mysql_real_escape_string (.. , PHP ), , , , . , HTML- .
, mysql_real_escape_string, , .