mirror of https://github.com/rwf2/Rocket.git
Use handlebars so that message is escaped in cookies example.
This commit is contained in:
parent
4d189df884
commit
d843e8354c
|
@ -12,4 +12,4 @@ lazy_static = "*"
|
|||
[dependencies.rocket_contrib]
|
||||
path = "../../contrib"
|
||||
default-features = false
|
||||
features = ["tera_templates"]
|
||||
features = ["handlebars_templates"]
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#![feature(plugin, custom_derive, custom_attribute)]
|
||||
#![plugin(rocket_codegen)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use] extern crate lazy_static;
|
||||
extern crate rocket_contrib;
|
||||
extern crate rocket;
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>Rocket Cookie Examples</h1>
|
||||
{% if message is defined %}
|
||||
<p>{{ message }}</p>
|
||||
{% else %}
|
||||
{{#if message }}
|
||||
<p>{{message}}</p>
|
||||
{{else}}
|
||||
<p>No message yet.</p>
|
||||
{% endif %}
|
||||
{{/if}}
|
||||
|
||||
<form action="/submit" method="post" accept-charset="utf-8">
|
||||
<textarea placeholder="Your message here..."
|
Loading…
Reference in New Issue