summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2009-01-25 15:32:03 +0000
committerJonas Häggqvist <rasher@rasher.dk>2009-01-25 15:32:03 +0000
commit03e90f841c4ae8943e7153f6c39283f05d9c5b28 (patch)
treef3a21cac6150c19b9a621c94908aa6eebe7df77d
parente5958df4695187668bad8c74448445d69d285e09 (diff)
downloadrockbox-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-xtools/langtool.pl4
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) {
elsif ($changetarget) {
# Change target if set and it's the same as $from
if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) {
- $line =~ s/$from/$to/;
+ $line =~ s/\Q$from/$to/;
}
}
elsif ($changesource) {
# Change string if $target is set and matches $s_target
if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") {
- $line =~ s/$string/$to/;
+ $line =~ s/\Q$string/$to/;
}
}
elsif ($changedesc) {