|
@@ -50,7 +50,7 @@ pub fn show_snippet(uuid: String, connection: DbConn) -> Template {
|
50
|
50
|
#[get("/snippets/<uuid>/raw")]
|
51
|
51
|
pub fn show_raw_snippet(uuid: String, connection: DbConn) -> String {
|
52
|
52
|
match snippet::get(&connection, &uuid) {
|
53
|
|
- Ok(snippet) => snippet.body,
|
|
53
|
+ Ok(snippet) => htmlescape::decode_html(&snippet.body).expect("Invalid HTML"),
|
54
|
54
|
Err(_) => String::from("Snippet not found"),
|
55
|
55
|
}
|
56
|
56
|
}
|