diff --git a/src/scripts/app.tag b/src/scripts/app.tag
index a861440..28ff20b 100644
--- a/src/scripts/app.tag
+++ b/src/scripts/app.tag
@@ -23,7 +23,9 @@
-
@@ -71,6 +71,7 @@ this.loading = false;
this.querystring = querystring;
this.converted = "Nothing here
";
+this.converter = new showdown.Converter();
this.placeholderText = "Write a post!";
this.placeholder = this.placeholderText;
@@ -212,7 +213,7 @@ self.loadPost = (_id) => {
return false;
}
self.update({"loading" : true});
- axios.get(`/blog/getpost/${_id.slice(-8)}`)
+ axios.get(`/blog/getrawpost/${_id.slice(-8)}`)
.then(function(resp) {
self.update({"loading" : false});
self.refs.textarea.value = resp.data.content;
diff --git a/src/scripts/riotblog.js b/src/scripts/riotblog.js
index 22e419c..d976118 100644
--- a/src/scripts/riotblog.js
+++ b/src/scripts/riotblog.js
@@ -1,13 +1,14 @@
import riot from 'riot';
import { default as RiotControl } from 'riotcontrol';
+import { default as promise } from 'es6-promise';
+import { default as smooth } from 'smoothscroll-polyfill';
import './post.tag';
import './posts.tag';
import './projects.tag';
import './app.tag';
import './grid.js';
-import { default as promise } from 'es6-promise';
-import { default as smooth } from 'smoothscroll-polyfill';
import 'element-closest';
+
import fetchCached from 'fetch-cached';
import 'whatwg-fetch';
diff --git a/src/website.py b/src/website.py
index e2ce9db..abb362e 100755
--- a/src/website.py
+++ b/src/website.py
@@ -159,6 +159,11 @@ def NeverWhere(configfile=None):
def getpost(_id):
return posts.getpost(_id)
+ @cache.cached(timeout=50)
+ @app.route("/blog/getrawpost/<_id>")
+ def getrawpost(_id):
+ return posts.getpost(_id, convert=False)
+
# get the first post of a given category
@cache.cached(timeout=50)
@app.route("/blog/getpost/")