Problem in CkEditor with PHP PDO

0

I have a PHP script that does an update in the database to change the css properties of some texts, however the inclusion is being done as follows:

<h2><span style=\"color:#fff; font-family:tahoma,geneva,sans-serif\">INFORMA&Ccedil;&Atilde;O E MONITORAMENTO, ONDE&nbsp;E QUANDO VOC&Ecirc; PRECISA</span></h2>

That is, after the style is including a counter-bar.

On every page that uses ckeditor this same error is occurring. How should I proceed?

    
asked by anonymous 25.03.2015 / 07:04

1 answer

2

It's probably coming from the database as well. You are escaping the quotes so as not to cause problems with SQL syntax and / or to help prevent SQL injection.

Use stripslashes :

  

Remove backslashes from a string.

Documentation

Example:

echo stripslashes($str);    
    
25.03.2015 / 12:00