diff options
author | Jonas Häggqvist <rasher@rasher.dk> | 2009-01-25 15:32:03 +0000 |
---|---|---|
committer | Jonas Häggqvist <rasher@rasher.dk> | 2009-01-25 15:32:03 +0000 |
commit | 03e90f841c4ae8943e7153f6c39283f05d9c5b28 (patch) | |
tree | f3a21cac6150c19b9a621c94908aa6eebe7df77d | |
parent | e5958df4695187668bad8c74448445d69d285e09 (diff) | |
download | rockbox-03e90f841c4ae8943e7153f6c39283f05d9c5b28.tar.gz rockbox-03e90f841c4ae8943e7153f6c39283f05d9c5b28.zip |
Escape strings for use in matches.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19852 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | tools/langtool.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/langtool.pl b/tools/langtool.pl index fe0c25bd39..59db1cf8a5 100755 --- a/tools/langtool.pl +++ b/tools/langtool.pl | |||
@@ -194,13 +194,13 @@ foreach my $file (@ARGV) { | |||
194 | elsif ($changetarget) { | 194 | elsif ($changetarget) { |
195 | # Change target if set and it's the same as $from | 195 | # Change target if set and it's the same as $from |
196 | if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { | 196 | if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { |
197 | $line =~ s/$from/$to/; | 197 | $line =~ s/\Q$from/$to/; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | elsif ($changesource) { | 200 | elsif ($changesource) { |
201 | # Change string if $target is set and matches $s_target | 201 | # Change string if $target is set and matches $s_target |
202 | if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") { | 202 | if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") { |
203 | $line =~ s/$string/$to/; | 203 | $line =~ s/\Q$string/$to/; |
204 | } | 204 | } |
205 | } | 205 | } |
206 | elsif ($changedesc) { | 206 | elsif ($changedesc) { |