From: Nick Porter Date: Tue, 6 Feb 2024 18:31:50 +0000 (+0000) Subject: Add rules for parsing literals in tmpls X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b853f59d5db59e1386e56ac688bbcb47ede8ac0a;p=thirdparty%2Ffreeradius-server.git Add rules for parsing literals in tmpls --- diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index bb731fde12c..e4842da4040 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -236,6 +236,7 @@ extern size_t tmpl_type_table_len; typedef struct tmpl_rules_s tmpl_rules_t; typedef struct tmpl_attr_rules_s tmpl_attr_rules_t; typedef struct tmpl_xlat_rules_s tmpl_xlat_rules_t; +typedef struct tmpl_literal_rules_s tmpl_literal_rules_t; typedef struct tmpl_res_rules_s tmpl_res_rules_t; typedef struct tmpl_s tmpl_t; @@ -334,6 +335,10 @@ struct tmpl_xlat_rules_s { bool new_functions; //!< new function syntax }; +struct tmpl_literal_rules_s { + fr_value_box_safe_for_t safe_for; //!< What should literals be marked up safe for +}; + /** Optional arguments passed to vp_tmpl functions * */ @@ -353,7 +358,9 @@ struct tmpl_rules_s { ///< Instantiated xlats are not added to the global ///< trees, regexes are not JIT'd. - tmpl_escape_t escape; //!< How escaping should be handled during evaluation. + tmpl_escape_t escape; //!< How escaping should be handled during evaluation. + + tmpl_literal_rules_t literal; //!< Rules for parsing literals. }; /** Similar to tmpl_rules_t, but used to specify parameters that may change during subsequent resolution passes