I\'m building a simple blog system with FuelPHP and TinyMCE editor.
When I format my text in the TinyMCE (or CKEditor, doesn\'t matter) and save it in my database ev
How can you pass the data to the view? Can you show the code?
If you are using the View class there is a method which can let you choice when to encode the text or not (default is yes).
when you save your data in database its encoded for some security reasons you just need to
html_entity_decode("string retrived from database");
and then print it.
Instead of encoding and decoding you can use the set_safe() method or use the $filter
argument in set().
Like this:
$view->set_safe('body', $data);
Or
$view->set('body', $data, false);
Or whitelist your view. Which will prevent decoding.