From e5cf19d15401b6499f3f554b5423371c2a607a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 12 Nov 2013 13:57:21 +0100 Subject: [PATCH] Bug #2285: unescape only eats one backslash (cherry picked from commit 59f9e09aac019c44bfa1a1d4da637b7a819cf4e0) --- src/template/template_syntax.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/template/template_syntax.y b/src/template/template_syntax.y index 4c234e5074..103c886cb6 100644 --- a/src/template/template_syntax.y +++ b/src/template/template_syntax.y @@ -165,9 +165,9 @@ array_val: VARIABLE EQUAL STRING string& unescape (string &str) { - size_t pos; + size_t pos = 0; - while ((pos = str.find("\\\"")) != string::npos) + while ((pos = str.find("\\\"", pos)) != string::npos) { str.replace(pos,2,"\""); }