fix nested quotes and alter linebreak parsing
This commit is contained in:
@ -73,4 +73,22 @@ return {
|
||||
schema.add_column("users", "signature_original_markup", types.text{default = ""})
|
||||
schema.add_column("users", "signature_rendered", types.text{default = ""})
|
||||
end,
|
||||
|
||||
[11] = function ()
|
||||
local render = require("lib.babycode").to_html
|
||||
local html_escape = require("lapis.html").escape
|
||||
local phs = db.query("SELECT * from post_history")
|
||||
local users = db.query("SELECT * from users")
|
||||
db.query("BEGIN")
|
||||
|
||||
for _, post_history in ipairs(phs) do
|
||||
db.query("UPDATE post_history SET content = ? WHERE id = ?", render(post_history.original_markup, html_escape), post_history.id)
|
||||
end
|
||||
|
||||
for _, user in ipairs(users) do
|
||||
db.query("UPDATE users SET signature_rendered = ? WHERE id = ?", render(user.signature_original_markup, html_escape), user.id)
|
||||
end
|
||||
|
||||
db.query("COMMIT")
|
||||
end,
|
||||
}
|
||||
|
Reference in New Issue
Block a user