AsciiDoc-Gitea article: Updated Gitea-patch to 1.10.0.
This commit is contained in:
parent
d3bfd509b9
commit
c9b084cf74
|
@ -67,13 +67,16 @@ and the `class` exception is only useful if you add custom CSS to use them.
|
||||||
Apply the patch with `patch -p1 < gitea_relax-sanitizer.patch`.
|
Apply the patch with `patch -p1 < gitea_relax-sanitizer.patch`.
|
||||||
|
|
||||||
----
|
----
|
||||||
{{< highlight diff >}}diff -ur a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go
|
{{< highlight diff >}}
|
||||||
--- a/modules/markup/sanitizer.go 2019-01-26 16:04:56.014108339 +0100
|
diff --git a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go
|
||||||
+++ b/modules/markup/sanitizer.go 2019-01-26 16:03:21.776401012 +0100
|
index fd6f90b2a..ae11811b6 100644
|
||||||
@@ -38,6 +38,16 @@
|
--- a/modules/markup/sanitizer.go
|
||||||
|
+++ b/modules/markup/sanitizer.go
|
||||||
|
@@ -41,5 +41,16 @@ func NewSanitizer() {
|
||||||
|
|
||||||
// Custom URL-Schemes
|
// Allow keyword markup
|
||||||
sanitizer.policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
|
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^` + keywordClass + `$`)).OnElements("span")
|
||||||
|
+
|
||||||
+ // Allow style on span tags
|
+ // Allow style on span tags
|
||||||
+ sanitizer.policy.AllowAttrs("style").Matching(regexp.MustCompile(`^(background-)?color:[^;]+(; ?font[^;]+)?;?$`)).OnElements("span")
|
+ sanitizer.policy.AllowAttrs("style").Matching(regexp.MustCompile(`^(background-)?color:[^;]+(; ?font[^;]+)?;?$`)).OnElements("span")
|
||||||
+
|
+
|
||||||
|
@ -85,7 +88,8 @@ Apply the patch with `patch -p1 < gitea_relax-sanitizer.patch`.
|
||||||
+ sanitizer.policy.AllowAttrs("width").OnElements("col")
|
+ sanitizer.policy.AllowAttrs("width").OnElements("col")
|
||||||
+ sanitizer.policy.AllowAttrs("align", "valign").OnElements("td")
|
+ sanitizer.policy.AllowAttrs("align", "valign").OnElements("td")
|
||||||
})
|
})
|
||||||
}{{< / highlight >}}
|
}
|
||||||
|
{{< / highlight >}}
|
||||||
----
|
----
|
||||||
|
|
||||||
== Tables without borders
|
== Tables without borders
|
||||||
|
@ -109,3 +113,11 @@ In your Gitea directory, create `custom/templates/custom/header.tmpl`.
|
||||||
}
|
}
|
||||||
</style>{{< / highlight >}}
|
</style>{{< / highlight >}}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
== Updates
|
||||||
|
|
||||||
|
* 2019-11-14: Updated Gitea patch for 1.10.0.
|
||||||
|
|
||||||
|
// Local Variables:
|
||||||
|
// no-ws-cleanup: t
|
||||||
|
// End:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user