Hello,

I can not figure out the following , maybe i miss something very obvious..

How can i insert html code in a diet file as a variable?

I have :

string[] errors ~= "<li>This is one error</li>";
errors ~= "<li>This is another error</li>";

Then:

string errorstring;
	foreach(er; errors){
		errorstring ~= er;
	}
	req.params["error"] = urlEncode(errorstring);
	showPage(req,res);

And then at showPage function:

if (auto er = "error" in req.params) info.errors = *er;

(Passing the string with in an info struct).

Then in my diet template i have:

- if(info.errors != "")
	ul
|#{vibe.textfilter.urlencode.urlDecode(info.errors)}

but it gives the string as text and not html.
i tried also: ul

|!= #{info.errors} or |!= "#{info.errors}"

but it gives <ul>#{info.errors}</ul>

Any ideas?

And by the way does anybody have any advice about the best way to pass errors or notifications to different HTTP functions?
Hardcode them where they are displayed and pass error codes in queries?
Pass the error strings as parameters (but this doesn't work with res.redirect) or as query parameters in the url?

Thank you!