Skip to content

Commit

Permalink
Fix EZP-26276: Exclamation mark followed by non-chars at end of URL d…
Browse files Browse the repository at this point in the history
…oes not work in emails (#1260)
  • Loading branch information
gabrielfin authored and glye committed Sep 20, 2016
1 parent 8a19ea9 commit 6e625be
Showing 1 changed file with 2 additions and 6 deletions.
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

0 comments on commit 6e625be

Please sign in to comment.