diff src/save_edit.js.luan @ 21:33731231093a

fix bbcode editing
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 Jul 2022 08:24:52 -0600
parents da006d1c1eba
children 66fd3784e60e
line wrap: on
line diff
--- a/src/save_edit.js.luan	Wed Jul 13 22:00:00 2022 -0600
+++ b/src/save_edit.js.luan	Sun Jul 17 08:24:52 2022 -0600
@@ -7,7 +7,7 @@
 local Http = require "luan:http/Http.luan"
 local Post = require "site:/lib/Post.luan"
 local Bbcode = require "site:/lib/Bbcode.luan"
-local bbcode_preprocess = Bbcode.preprocess or error()
+local remove_html = Bbcode.remove_html or error()
 local bbcode_to_html = Bbcode.to_html or error()
 local Db = require "site:/lib/Db.luan"
 
@@ -15,7 +15,7 @@
 return function()
 	local post = Http.request.parameters.post or error()
 	local text = Http.request.parameters.text or error()
-	text = bbcode_preprocess(text)
+	text = remove_html(text)
 	Db.run_in_transaction( function()
 		post = Post.get_by_id(post) or error()
 		post.author_is_current() or error()