From 3f7c8792d1c2cd223e2d8a62815b7f67fa7d7c6b Mon Sep 17 00:00:00 2001 From: teodor Date: Tue, 30 Sep 2008 13:26:12 +0000 Subject: [PATCH] add forgotten calls for url/html escape --- template.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/template.c b/template.c index 4f6fbdd..6561ee1 100644 --- a/template.c +++ b/template.c @@ -623,6 +623,7 @@ printVal( Template tmpl, VariableValue value, int *len, char *format ) { } *len = printedlen; + return res; } @@ -758,7 +759,13 @@ printNode( Template tmpl, TemplateNode node ) { char *res; res = printVal(tmpl, value, &len, node->nodeData.variable.formatValue); - if ( res && len>0 ) { + + if ( (node->nodeData.variable.flags & TND_HTMLESCAPE) && tmpl->htmlEscape ) + res = tmpl->htmlEscape(res, &len); + if ( (node->nodeData.variable.flags & TND_URLESCAPE) && tmpl->urlEscape ) + res = tmpl->urlEscape(res, &len); + + if ( res && len>0 ) { tmpl->printString( res, len ); mcfree(res); } -- 2.46.1