Make print match parse
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 Mar 2015 19:37:58 +0000 (14:37 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 Mar 2015 19:37:58 +0000 (14:37 -0500)
src/main/tmpl.c

index 29d6ccf..143bbe2 100644 (file)
@@ -1628,7 +1628,11 @@ size_t tmpl_prints(char *out, size_t outlen, value_pair_tmpl_t const *vpt, DICT_
        /*
         *      Print it with appropriate escaping
         */
-       len = fr_prints(q, outlen - 3, vpt->name, -1, c);
+       if (cf_new_escape && (c == '/')) {
+               len = fr_prints(q, outlen - 3, vpt->name, -1, '\0');
+       } else {
+               len = fr_prints(q, outlen - 3, vpt->name, -1, c);
+       }
 
        q += len;
        *(q++) = c;