diff --git a/README.md b/README.md
index db51c43..40f84c6 100644
--- a/README.md
+++ b/README.md
@@ -7,9 +7,10 @@ In action on my website: [deadvey.com](https://deadvey.com)
* powerful customisation
* rss
* timeline, user page, post page and tag specific page
+* edit/delete posts
+* probably insecure as hell
# planned features
* atom
* federation
* sign up
-* edit/delete posts
diff --git a/app.js b/app.js
index 10d13e2..225adc8 100755
--- a/app.js
+++ b/app.js
@@ -48,6 +48,7 @@ function hyperlink_tags(tags) {
function replace_format_indicators(input_string, post_index=0, tag_name="tag") {
post_object = posts.posts[post_index]
output_string = input_string
+ .replaceAll("%%", "%")
.replaceAll("%A", (post_object["tags"]))
.replaceAll("%B", (hyperlink_tags(post_object["tags"])))
.replaceAll("%C", post_object["content"].replaceAll("\n","
"))
@@ -59,7 +60,7 @@ function replace_format_indicators(input_string, post_index=0, tag_name="tag") {
.replaceAll("%L", `/post/${post_index}`)
.replaceAll("%N", users.users[post_object["userID"]]['username'])
.replaceAll("%P", "/post")
- .replaceAll("%O", "/edit")
+ .replaceAll("%O", `/edit/${post_index}`)
.replaceAll("%R", "/rss")
.replaceAll("%S", config.seperator)
.replaceAll("%T", post_object["title"])
@@ -114,11 +115,11 @@ app.get("/", (req,res) => {
posts_div += replace_format_indicators(post, counter);
counter -= 1;
}
- res.send(`