? Success
Pull Request for # 6803

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
20 Apr 2015

See #6803
The à character has a UTF8 hex value of 0xA0
The non breaking space has a value of 0xC2 0xA0

The normal trim() php method trims the characters chr() in the charlist one by one.
Therefore when JFilterInput::getInstance->clean($data['created_by_alias'], 'TRIM') is used, (here for the created by alias field in article edit->publishing) and the alias entered ends with an à, that character is deleted by the method.

The solution is to use our custom utf8 method JString::trim() instead of trim.

Test before patch by entering Saccà in the field and saving.

Test after patch.
Also, after patch, make sure it works fine to trim
multibyte space:
「 」

non-breaking space:
「 」

normal space
「 」

by entering one OR the other spaces above before and after the desired word.

avatar infograf768 infograf768 - open - 20 Apr 2015
avatar fontanil
fontanil - comment - 21 Apr 2015

@test: works for me, thanks!

avatar brianteeman brianteeman - change - 22 Apr 2015
Status New Pending
Rel_Number 6803
Relation Type Pull Request for
avatar brianteeman brianteeman - alter_testresult - 22 Apr 2015 - fontanil: Tested successfully
avatar Erftralle
Erftralle - comment - 23 Apr 2015

@test: The changes in libraries/joomla/filter/input.php work fine for me.

I could not test the changes in libraries/vendor/joomla/filter/src/InputFilter.php.
I think, it is not in use, or am I wrong?
Wouldn't it be better to use Joomla\String\String::trim() directly here?
Should the PR not better be done against the Joomla! Framework Filter repository or is there a way changes in the libraries of the joomla-cms repository will find there way back into the joomla-framework repository?

avatar infograf768
infograf768 - comment - 23 Apr 2015

Normally, a change such as this one has to be also done in Framework.

avatar infograf768 infograf768 - change - 23 Apr 2015
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 23 Apr 2015

RTC


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

avatar infograf768 infograf768 - alter_testresult - 23 Apr 2015 - Erftralle: Tested successfully
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Category External Library Libraries
avatar Bakual Bakual - change - 6 May 2015
Labels Removed: ?
avatar Bakual Bakual - change - 6 May 2015
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 May 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 May 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 6 May 2015

I'm sorry to say, but this PR isn't RTC. We don't make changes to the libraries in the vendor folder as they would be overwritten again when we run composer next time.
That fix needs to be done in the framework repo and from there it will be pulled down again.

avatar Bakual Bakual - change - 6 May 2015
Status Ready to Commit Pending
avatar infograf768
infograf768 - comment - 6 May 2015

Will delete the part concerning vendor.
Can we use JString::trim() in the framework?

avatar Bakual Bakual - change - 6 May 2015
Labels Removed: ?
avatar Bakual Bakual - change - 6 May 2015
Labels Removed: ?
avatar Bakual
Bakual - comment - 6 May 2015

It's called differently since it's namespaced. So JString will not work. It would be Joomla\String\String or so. And it would add a dependancy for that class to the input package. But that's something the framework guys will have to decide if they want that added dependancy.

avatar infograf768
infograf768 - comment - 6 May 2015

Removed changes from vendor folder. Can you RTC again?

avatar Bakual
Bakual - comment - 6 May 2015

Yep, looks fine now.

avatar Bakual Bakual - change - 6 May 2015
Status Pending Ready to Commit
avatar Bakual Bakual - change - 6 May 2015
Labels Added: ?
avatar Bakual Bakual - change - 6 May 2015
Labels Added: ?
avatar wilsonge wilsonge - reference | 2444ce9 - 15 May 15
avatar zero-24 zero-24 - close - 15 May 2015
avatar wilsonge wilsonge - change - 15 May 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-05-15 09:36:46
Closed_By wilsonge
avatar wilsonge wilsonge - close - 15 May 2015
avatar wilsonge wilsonge - close - 15 May 2015
avatar infograf768 infograf768 - head_ref_deleted - 15 May 2015
avatar zero-24 zero-24 - change - 15 May 2015
Milestone Added:
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment