Precentage sign in textarea field cause missing characters
  • 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 !
  • 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.
  • It works ! Many thanks !

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!