Ckeditor problem with PHP PDO

Asked

Viewed 136 times

0

I have a PHP script that performs a database update to change the css properties of some texts, but 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 all pages that use the ckeditor this same error is happening. How should I proceed?

1 answer

2


It’s probably coming from the database like this. Is escaping the quotes to not cause problems with SQL syntax and/or help prevent SQL Injection.

Usa stripslashes:

Removes inverted bars from a string.

Documentation

Example:

echo stripslashes($str);    

Browser other questions tagged

You are not signed in. Login or sign up in order to post.