Precentage sign in textarea field cause missing characters

edited October 2017 in Bug Reports
I'd a textarea field generate by form_builder in simple module, when user input a percentage sign (%) inside, some characters after the sign (and the sign itself) is cut after save. I track the value of the textarea field, and found that in on_before_post, it is normal, but in all functions after that (on_before_clean, on_before_validate ...,etc), the %?? is cut.

Anything I can do to avoid this problem ?

Thanks a lot !


  • edited 8:55AM
    It may have something to do with the sanitization being done on save for the module. For your module's config, add the parameter:
    'sanitize_input' => array('template','php'),
    The default is the value of "TRUE" which is an array of array('template','php','xss_clean'). This will exclude the xss_clean.
  • edited 8:55AM
    It works ! Many thanks !
Sign In or Register to comment.