commandURLCleanup now strips all unwanted chars at the end of the string#17
commandURLCleanup now strips all unwanted chars at the end of the string#17
Conversation
| "#\.\.+#", # Remove double dots | ||
| "#[{$sepQ}]+#", # Turn multiple separators into one | ||
| "#^[{$sepQ}]+|[{$sepQ}]+$#" ), # Strip separator from beginning/end | ||
| "#^[{$sepQ}\.]+|[{$sepQ}!\.]+$#" ), # Strip unwanted chars from beginning/end |
There was a problem hiding this comment.
This comment needs to be be more specific. It should say "Strip separator and periods from beginning / end"
| * @package tests | ||
| */ | ||
|
|
||
| class eZCharTransFormTests extends ezpTestCase |
There was a problem hiding this comment.
the "f" should not be capitalized
| public function __construct() | ||
| { | ||
| parent::__construct(); | ||
| $this->setName( "eZCharTransFormTests" ); |
There was a problem hiding this comment.
the "f" should not be capitalized
tests/tests/lib/ezi18n/suite.php
Outdated
| { | ||
| parent::__construct(); | ||
| $this->setName( "eZFile Test Suite" ); | ||
| $this->addTestSuite( 'eZCharTransFormTests' ); |
There was a problem hiding this comment.
the "f" should not be capitalized
| @@ -0,0 +1,41 @@ | |||
| <?php | |||
| /** | |||
| * File containing the eZCharTransFormTests class | |||
There was a problem hiding this comment.
the "f" should not be capitalized
|
Feedback implemented |
| "#\.\.+#", # Remove double dots | ||
| "#[{$sepQ}]+#", # Turn multiple separators into one | ||
| "#^[{$sepQ}\.]+|[{$sepQ}!\.]+$#" ), # Strip unwanted chars from beginning/end | ||
| "#^[{$sepQ}\.]+|[{$sepQ}!\.]+$#" ), # Strip separator and dot from beginning, strip exclemation mark, dot and separator from end |
There was a problem hiding this comment.
typo: should be "exclamation"
|
Tyop fixed |
|
+1 |
|
So I added the fix also to commandUrlFixIRI. It's also covered by dedicated tests. For commandUrlFixIRI I also drop the 'double quote' char. That was not in the original patch from eZ but I still think it's a good idea to remove it from the URL. |
|
This was fixed in the main eZ repo: ezsystems@6e625be +1 with the double quote strip as well. We should create an additional pull request against the eZ repo with the double quote strip. |
|
ez systems pull request: |
This came up in the CSM project: ticket 3479.
If you have an object name like "about." (including the double quotes), ezp was not removing the dot after 'about'.