XF 2.1 Allowing <xf:textbox> to submit spaces at the end and the front of a line

MilkyMeda

Member
<xf:textbox> doesn't submit the spaces at the front and at the end of a line:

What I give:

word

What I get in the database(no spaces):

word

How can I allow it to submit spaces like above?
 
Last edited:

Jeremy P

XenForo developer
Staff member
It's probably being cleaned by the input filterer. You can pass the no-trim option to disable this behavior.

PHP:
$input = $this->filter('name', 'str,no-trim');
 
Top