Sorry for the trouble. I checked in a change two days ago that seemed to be trivial (An option for Markdown to always escape '<' was added), but I forgot to pop the input element off a range in a loop, causing an infinite loop. Works now correctly (the preview suffered from the same bug).

As for the actual problem ;) - I'm pretty sure that req.params["username"] throws a RangeError there (maybe it should be req.form[]?). If you setLogLevel(LogLevel.Debug), you should get a stack trace on the console that gives more certainty.

Reformatted:

On Sat, 20 Oct 2012 02:36:31 +0200, denizzzka wrote:

req is passed to render:

void defaultHandler(HttpServerRequest req, HttpServerResponse res)
{
	render!("test.dt", req)(res);
}

template:

extends layout

block content
    h3 this is a form:
    form(method='get')
        fieldset
            legend General
                label(for='username') Username:
                    - auto v = req.params["username"];
                    input( type='text', name='username', value='#{v}' )

result is:

<!DOCTYPE html>
<html lang="ru">
	<head>
		<title>Info</title>
	</head>
	<body>
		<h1>test</h1>
		<img id="logo" src="/images/blyat.jpg" alt="Site logo"/>
		<h3>this is a form:</h3>
		<form method="get">
			<fieldset>
				<legend>General
					<label for="username">Username: