mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Allow class attributes in sanitized html for emails
This commit is contained in:
@ -13,9 +13,11 @@ import emil.jsoup._
|
||||
import scodec.bits.ByteVector
|
||||
|
||||
object JsoupSanitizer {
|
||||
private val whitelist =
|
||||
EmailWhitelist.default.addAttributes(":all", "class")
|
||||
|
||||
private val change =
|
||||
BodyClean.whitelistClean(EmailWhitelist.default)
|
||||
BodyClean.whitelistClean(whitelist)
|
||||
|
||||
def clean(html: String): String =
|
||||
BodyClean.modifyContent(change)(BodyContent(html)).asString
|
||||
|
Reference in New Issue
Block a user