disable html <> in text fields

Questionsdisable html <> in text fields
Matthew asked 7 years ago

Hi Abu,
 
I’ve got an issue where users are entering in greater than and less than symbols into text/textarea fields and the data isn’t being saved.  I’ve determined that the system is thinking it’s html code and ignoring it.  Is there anyway to disable html in the fields, i.e. just insert whatever the user types in?
 
Example:

  • User types in “<1111”.  When entered via inline edit it goes in fine, when using form edit nothing goes in.  Anything after and including the “<” symbol gets ignored unless a corresponding “>” symbol shows up.

 
Thanks mate

1 Answers
Abu Ghufran Staff answered 7 years ago

You can disable it by setting:

$opt["sanitize"] = false;
...
$g->set_options($opt);
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

2 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?