Skip to content

Commit

Permalink
Item14052: fixed implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Apr 20, 2016
1 parent e8e3439 commit a09d087
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/FilterPlugin.pm
Expand Up @@ -21,7 +21,7 @@ use warnings;

use Foswiki::Func();

our $VERSION = '4.20';
our $VERSION = '4.21';
our $RELEASE = '20 Apr 2016';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Substitute and extract information from content by using regular expressions';
Expand Down
7 changes: 6 additions & 1 deletion lib/Foswiki/Plugins/FilterPlugin/Core.pm
Expand Up @@ -755,7 +755,12 @@ sub transliterate {

# apply own decoding if present
if ($map) {
$string =~ s/(.)/$map->{$1}||$1/ge;
foreach my $pattern (keys %$map) {
my $replace = $map->{$pattern} || '';
if ($string =~ s/$pattern/$replace/g) {
return $string;
}
}
}

$string = Text::Unidecode::unidecode($string);
Expand Down

0 comments on commit a09d087

Please sign in to comment.