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]
|
[dependencies.rocket_contrib]
|
||||||
path = "../../contrib"
|
path = "../../contrib"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["tera_templates"]
|
features = ["handlebars_templates"]
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#![feature(plugin, custom_derive, custom_attribute)]
|
#![feature(plugin, custom_derive, custom_attribute)]
|
||||||
#![plugin(rocket_codegen)]
|
#![plugin(rocket_codegen)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use] extern crate lazy_static;
|
||||||
extern crate lazy_static;
|
|
||||||
extern crate rocket_contrib;
|
extern crate rocket_contrib;
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Rocket Cookie Examples</h1>
|
<h1>Rocket Cookie Examples</h1>
|
||||||
{% if message is defined %}
|
{{#if message }}
|
||||||
<p>{{ message }}</p>
|
<p>{{message}}</p>
|
||||||
{% else %}
|
{{else}}
|
||||||
<p>No message yet.</p>
|
<p>No message yet.</p>
|
||||||
{% endif %}
|
{{/if}}
|
||||||
|
|
||||||
<form action="/submit" method="post" accept-charset="utf-8">
|
<form action="/submit" method="post" accept-charset="utf-8">
|
||||||
<textarea placeholder="Your message here..."
|
<textarea placeholder="Your message here..."
|
Loading…
Reference in New Issue