X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=actions.c;h=f0898367441e976519b20690d19a43d6ba0fa6a3;hp=54f1d216d4e82a8a2ae0dab72daa52903c92188d;hb=c8518a21590aa1456f4cea95fcc3a2d099a74ed0;hpb=34810d73c348ce7f77f150feb95d0f9a22814077 diff --git a/actions.c b/actions.c index 54f1d216..f0898367 100644 --- a/actions.c +++ b/actions.c @@ -1,4 +1,4 @@ -const char actions_rcs[] = "$Id: actions.c,v 1.84 2012/07/27 17:39:57 fabiankeil Exp $"; +const char actions_rcs[] = "$Id: actions.c,v 1.86 2012/11/11 12:37:10 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/actions.c,v $ @@ -208,7 +208,7 @@ jb_err merge_actions (struct action_spec *dest, * 1 : dest = Destination of copy. * 2 : src = Source for copy. * - * Returns : N/A + * Returns : JB_ERR_OK or JB_ERR_MEMORY * *********************************************************************/ jb_err copy_action (struct action_spec *dest, @@ -395,7 +395,17 @@ jb_err get_action_token(char **line, char **name, char **value) str++; *value = str; - str = strchr(str, '}'); + /* The value ends with the first non-escaped closing curly brace */ + while ((str = strchr(str, '}')) != NULL) + { + if (str[-1] == '\\') + { + /* Overwrite the '\' so the action doesn't see it. */ + string_move(str-1, str); + continue; + } + break; + } if (str == NULL) { /* error */