Skip to content
Snippets Groups Projects
Commit 748e144a authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

allow '%' escape; treat anything else as error

parent 0549d46a
Branches
Tags
No related merge requests found
......@@ -160,6 +160,16 @@ rewrite_subst_compile(
submatch[ nsub ].ls_type =
REWRITE_SUBMATCH_MAP_W_ARG;
submatch[ nsub ].ls_map = map;
/*
* Escape '%' ...
*/
} else if ( p[ 1 ] == '%' ) {
AC_MEMCPY( &p[ 1 ], &p[ 2 ], strlen( &p[ 1 ] ) );
continue;
} else {
return NULL;
}
nsub++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment