[eluser]Unknown[/eluser]
I am writing a Blog module, and sanitize the blog_post at INPUT with
Code:
$this->form_validation->set_rules('blog_data', 'Blog Post', 'trim|required|min_length[5]|xss_clean');
Now that the input has been sanitized I have lost the HTML styling, Can anyone recommend a way to get the styling back to show the blog post in the original styling as posted by the user?
If sanitizing the HTML data at OUTPUT (instead of INPUT) is a good practice then how do people retain the original styling?
For example, wordpress is storing HTML data of user blogs in original form with all styling tags intact (raw HTML). But it must be sanitizing it during output. Then how does it retain the original styling?
How to do it in codeigniter? Please help I have been banging my head for 3 days now .:/