threads / patch / 15291

patchgit-gui: Fix string escaping in po2msg.sh

Subject: [PATCH (GIT-GUI MSYSGIT FIX)] git-gui: Fix string escaping in po2msg.sh

## tl;dr

One message between Aug 30, 2008 and Aug 30, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Alexander Gavrilov· Aug 30, 2008, 21:12 UTC · lore

Escape '$', because otherwise git-gui crashes while trying to load malformed Japanese localization strings.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 po/po2msg.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to po/po2msg.sh +2 −2
diff --git a/po/po2msg.sh b/po/po2msg.sh
index b7c4bf3..1e9f992 100644
--- a/po/po2msg.sh
+++ b/po/po2msg.sh
@@ -11,8 +11,8 @@ proc u2a {s} {
 	foreach i [split $s ""] {
 		scan $i %c c
 		if {$c<128} {
-			# escape '[', '\' and ']'
-			if {$c == 0x5b || $c == 0x5d} {
+			# escape '[', '\', '$' and ']'
+			if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
 				append res "\\"
 			}
 			append res $i
-- 
1.6.0.20.g6148bc

← back to recent threads