php - html_entity_decode() isn't working properly? -


edit: solved seconds after posting question (sorry!) can't accept answer yet.

hi folks,

just quick one. have php/codeigniter site , user can edit profile. i'm using ci's xss filtering , active record-based models, data escaped automatically.

it naturally displays fine on profile page view, text such "we'll see if works" (the apostrophe in we'll). when user goes edit page, input box (filled data in db) displays:

we'll see if works 

i thought around setting value of input box html_entity_decode($query->row('example_database_row')) still doesn't work. misunderstanding here?

thanks!

jack

you can use html_entity_decode($query->row('example_database_row'), ent_quotes).

however, advise against html encoding before insert database. encode when output it. it's better storing raw data in database.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -