Welcome Guest, Not a member yet? Register   Sign In
Textarea and converting entities
#3

(02-03-2015, 02:23 PM)Avenirer Wrote: I guess you can use PHP's htmlentities() function:



PHP Code:
<?php echo form_textarea($inputs['PAGE_CONTENT'], set_value('PAGE_CONTENT'htmlentities($row->PAGE_CONTENT))); ?>

When i took out the set_value() function from the form_textarea(), I would get the correct values sometimes and other times they wouldn't show up. Do you know if I should be using the set_value() function at all for the form_textarea() function or would it just be easier to not use the helper for the text area and just use plain HTML and echo out the value inside of a text area html tag.

Also for anyone reading this now. How should I store HTML from the WYSIWYG editor in the database. Should i be running it through any of Codeigniter's form prep/validation rules or any other PHP functions or is storing plain HTML OK.
Reply


Messages In This Thread
Textarea and converting entities - by egall8 - 02-03-2015, 12:39 PM
RE: Textarea and converting entities - by egall8 - 02-05-2015, 09:00 AM
RE: Textarea and converting entities - by Narf - 02-05-2015, 11:16 AM
RE: Textarea and converting entities - by Narf - 02-07-2015, 01:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB