Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/ezi18n/classes/ezchartransform.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,10 @@ static function commandUrlCleanup( $text, $charsetName )
$sep = eZCharTransform::wordSeparator();
$sepQ = preg_quote( $sep );
$text = preg_replace( array( "#[^a-zA-Z0-9_!\.-]+#",
"#^[\.]+|[!\.]+$#", # Remove dots at beginning/end
"#\.\.+#", # Remove double dots
"#[{$sepQ}]+#", # Turn multiple separators into one
"#^[{$sepQ}]+|[{$sepQ}]+$#" ), # Strip separator from beginning/end
"#^[\.{$sepQ}]+|[!\.{$sepQ}]+$#" ), # Strip "!", dots and separator from beginning/end
array( $sep,
$sep,
$sep,
$sep,
"" ),
Expand All @@ -423,12 +421,10 @@ static function commandUrlCleanupIRI( $text, $charsetName )
if ( $sep != "-" )
$prepost .= "-";
$text = preg_replace( array( "#[ \t\\\\%\#&;/:=?\[\]()+]+#",
"#^[\.]+|[!\.]+$#", # Remove dots at beginning/end
"#\.\.+#", # Remove double dots
"#[{$sepQ}]+#", # Turn multiple separators into one
"#^[{$prepost}]+|[{$prepost}]+$#" ),
"#^[{$prepost}]+|[!{$prepost}]+$#" ), # Strip "!", dots and separator from beginning/end
array( $sep,
$sep,
$sep,
$sep,
"" ),
Expand Down