mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Allow center
This commit is contained in:
parent
c1a78c2006
commit
4ebf9e02ef
@ -295,7 +295,7 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
|
|
||||||
// Destroy page if it is opened and primed
|
// Destroy page if it is opened and primed
|
||||||
if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted {
|
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()
|
p.Erase()
|
||||||
if p.IsPublished {
|
if p.IsPublished {
|
||||||
command = "/read"
|
command = "/read"
|
||||||
|
1
utils.go
1
utils.go
@ -182,6 +182,7 @@ func MarkdownToHtml(s string) string {
|
|||||||
|
|
||||||
pClean := bluemonday.UGCPolicy()
|
pClean := bluemonday.UGCPolicy()
|
||||||
pClean.AllowElements("img")
|
pClean.AllowElements("img")
|
||||||
|
pClean.AllowElements("center")
|
||||||
pClean.AllowAttrs("alt").OnElements("img")
|
pClean.AllowAttrs("alt").OnElements("img")
|
||||||
pClean.AllowAttrs("src").OnElements("img")
|
pClean.AllowAttrs("src").OnElements("img")
|
||||||
pClean.AllowAttrs("class").OnElements("a")
|
pClean.AllowAttrs("class").OnElements("a")
|
||||||
|
Loading…
Reference in New Issue
Block a user