mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Allow center
This commit is contained in:
@@ -295,7 +295,7 @@ func handlePageRequest(c *gin.Context) {
|
||||
|
||||
// Destroy page if it is opened and primed
|
||||
if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted {
|
||||
p.Update("*This page has self-destructed. You cannot return to it.*\n\n" + p.Text.GetCurrent())
|
||||
p.Update("<center><em>This page has self-destructed. You cannot return to it.</em></center>\n\n" + p.Text.GetCurrent())
|
||||
p.Erase()
|
||||
if p.IsPublished {
|
||||
command = "/read"
|
||||
|
1
utils.go
1
utils.go
@@ -182,6 +182,7 @@ func MarkdownToHtml(s string) string {
|
||||
|
||||
pClean := bluemonday.UGCPolicy()
|
||||
pClean.AllowElements("img")
|
||||
pClean.AllowElements("center")
|
||||
pClean.AllowAttrs("alt").OnElements("img")
|
||||
pClean.AllowAttrs("src").OnElements("img")
|
||||
pClean.AllowAttrs("class").OnElements("a")
|
||||
|
Reference in New Issue
Block a user