RoyBarOn
RoyBarOn

Reputation: 987

How to save raw html to sql with codeigniter?

I'm working with Ionize - i'm trying to save text with html tags to mysqli, but i keep getting the text like this :

   <p>&lt;div class="foo"&gt;foo&lt;/div&gt;</p>

while i want to get

    <div class="foo">foo</div>

I've tried to replace all the htmlspecialchars methods with html_entity_decode but it didn't worked

Upvotes: 0

Views: 93

Answers (1)

BDS
BDS

Reputation: 200

It's ok to have it saved like that, you just have to apply htmlspecialchars_decode on your result before printing it.

Upvotes: 1

Related Questions