?
avatar bweston92
bweston92
28 Oct 2014

Steps to reproduce the issue

Go to the language manager, click "New" search for a language translation with a space prefix or suffix. This happens sometimes when copying a string from the browser and pasting it.

Expected result

I'd prefer if it trimmed the input.

Actual result

It doesn't trim the input.

System information (as much as possible)

PHP

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
2.00

avatar bweston92 bweston92 - open - 28 Oct 2014
avatar infograf768
infograf768 - comment - 28 Oct 2014

Please use the new TRIM method in JFilterInput

avatar bweston92
bweston92 - comment - 28 Oct 2014

Sorry, can't see no trim in JFilterInput. Also I'm sure trimming white-space is the same how-ever it is implemented.

avatar infograf768
infograf768 - comment - 28 Oct 2014

No, it is not. We also have Asian multibyte white spaces.
code could be similar to
$data['title'] = JFilterInput::getInstance()->clean($data['title'], 'TRIM');

see:
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/filter/input.php#L258
thanks

avatar bweston92
bweston92 - comment - 28 Oct 2014

Hmm I'd rather not have another ugly static method call, but oh-well will update.

avatar bweston92
bweston92 - comment - 28 Oct 2014

Updated PR.

avatar Kubik-Rubik
Kubik-Rubik - comment - 28 Oct 2014

We have a PR (#4946), I will close this issue entry. Thanks!

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4945.

avatar zero-24 zero-24 - close - 28 Oct 2014
avatar Kubik-Rubik Kubik-Rubik - change - 28 Oct 2014
Status New Closed
avatar jissues-bot jissues-bot - change - 28 Oct 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-10-28 12:57:19
avatar jissues-bot jissues-bot - close - 28 Oct 2014
avatar jissues-bot
jissues-bot - comment - 28 Oct 2014
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment