Package smallmonday provides a small-web (i.e., smallweb / smolweb) extensions for the bluemonday HTML sanitizer, for the Go programming language.
Find a file
2025-09-22 12:50:09 -07:00
allowa.go <a> 2025-09-06 15:43:21 -07:00
allowa_test.go <a> 2025-09-06 15:43:21 -07:00
allowabbr.go <abbr> 2025-09-06 15:53:12 -07:00
allowabbr_test.go <abbr> 2025-09-06 15:53:12 -07:00
allowacronym.go <acronym> 2025-09-06 15:55:50 -07:00
allowacronym_test.go <acronym> 2025-09-06 15:55:50 -07:00
allowaddress.go <address> 2025-09-06 15:59:05 -07:00
allowaddress_test.go <address> 2025-09-06 15:59:05 -07:00
allowaside.go <aside> 2025-09-06 17:16:45 -07:00
allowaside_test.go <aside> 2025-09-06 17:16:45 -07:00
allowaudio.go <audio> <source> 2025-09-06 11:27:31 -07:00
allowaudio_test.go <audio> <source> 2025-09-06 11:27:31 -07:00
allowb.go <b> 2025-09-06 16:21:49 -07:00
allowb_test.go <b> 2025-09-06 16:21:49 -07:00
allowblink.go <blink> 2025-09-06 11:29:17 -07:00
allowblink_test.go <blink> 2025-09-06 11:29:17 -07:00
allowbr.go <br> 2025-09-06 16:09:19 -07:00
allowbr_test.go <br> 2025-09-06 16:09:19 -07:00
allowcenter.go <center> 2025-09-06 12:41:42 -07:00
allowcenter_test.go <center> 2025-09-06 12:41:42 -07:00
allowcode.go <code> 2025-09-06 16:13:22 -07:00
allowcode_test.go <code> 2025-09-06 16:13:22 -07:00
allowdata.go <data> 2025-09-06 15:15:43 -07:00
allowdata_test.go <data> 2025-09-06 15:15:43 -07:00
allowdetails.go <details> <summary> 2025-09-06 12:21:56 -07:00
allowdetails_test.go <details> <summary> 2025-09-06 12:21:56 -07:00
allowem.go <em> 2025-09-06 16:27:19 -07:00
allowem_test.go <em> 2025-09-06 16:27:19 -07:00
allowfigure.go <figure> <figcaption> 2025-09-06 11:31:31 -07:00
allowfigure_test.go <figure> <figcaption> 2025-09-06 11:31:31 -07:00
allowfont.go <font> 2025-09-06 11:42:18 -07:00
allowfont_test.go <font> 2025-09-06 11:42:18 -07:00
allowheading.go <h1> <h2> <h3> <h4> <h5> <h6> <hgroup> <p> 2025-09-06 11:58:44 -07:00
allowheading_test.go <h1> <h2> <h3> <h4> <h5> <h6> <hgroup> <p> 2025-09-06 11:58:44 -07:00
allowhr.go <hr> 2025-09-06 16:28:41 -07:00
allowhr_test.go <hr> 2025-09-06 16:28:41 -07:00
allowi.go <i> 2025-09-06 16:23:08 -07:00
allowi_test.go <i> 2025-09-06 16:23:08 -07:00
allowimg.go <img> 2025-09-06 17:14:02 -07:00
allowimg_test.go <img> 2025-09-06 17:14:02 -07:00
allowkbd.go <kbd> 2025-09-06 13:48:15 -07:00
allowkbd_test.go <kbd> 2025-09-06 13:48:15 -07:00
allowmain.go <main> 2025-09-22 12:50:09 -07:00
allowmark.go <mark> 2025-09-06 16:18:38 -07:00
allowmark_test.go <mark> 2025-09-06 16:18:38 -07:00
allowmarquee.go <marquee> 2025-09-06 11:40:45 -07:00
allowmarquee_test.go <marquee> 2025-09-06 11:40:45 -07:00
allowmeta.go <meta> 2025-09-06 11:36:00 -07:00
allowmeta_test.go <meta> 2025-09-06 11:36:00 -07:00
allowmicrodata.go microdata 2025-09-06 11:39:31 -07:00
allowmicrodata_test.go microdata 2025-09-06 11:39:31 -07:00
allowp.go <p> 2025-09-06 16:04:55 -07:00
allowp_test.go <p> 2025-09-06 16:04:55 -07:00
allowpre.go <pre> 2025-09-06 16:16:15 -07:00
allowpre_test.go <pre> 2025-09-06 16:19:56 -07:00
allowquotation.go <blockquote> <cite> <q> 2025-09-06 11:59:15 -07:00
allowquotation_test.go <blockquote> <cite> <q> 2025-09-06 11:59:15 -07:00
allowrdfa.go RDFa 2025-09-06 11:32:42 -07:00
allowrdfa_test.go RDFa 2025-09-06 11:32:42 -07:00
allowsamp.go <samp> 2025-09-06 13:43:55 -07:00
allowsamp_test.go <samp> 2025-09-06 13:43:55 -07:00
allowsection.go <section> 2025-09-06 16:07:07 -07:00
allowsection_test.go <section> 2025-09-06 16:07:07 -07:00
allowstrong.go <strong> 2025-09-06 16:24:24 -07:00
allowstrong_test.go <strong> 2025-09-06 16:24:24 -07:00
allowtable.go <caption> <col> <colgroup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> 2025-09-06 13:02:11 -07:00
allowtable_test.go <caption> <col> <colgroup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> 2025-09-06 13:02:11 -07:00
allowtime.go datetime attribute 2025-09-20 06:22:17 -07:00
allowtime_test.go datetime attribute 2025-09-20 06:22:17 -07:00
allowtt.go <tt> 2025-09-06 17:06:35 -07:00
allowtt_test.go <tt> 2025-09-06 17:06:35 -07:00
allowvar.go <var> 2025-09-06 13:32:43 -07:00
allowvar_test.go <var> 2025-09-06 13:32:43 -07:00
allowvideo.go <video> <source> 2025-09-06 11:37:21 -07:00
allowvideo_test.go <video> <source> 2025-09-06 11:37:21 -07:00
go.mod go.* 2025-09-06 11:34:16 -07:00
go.sum go.* 2025-09-06 11:34:16 -07:00
LICENSE initial commits 2025-09-06 11:20:45 -07:00
README.md docs 2025-09-20 07:37:16 -07:00

go-smallmonday

Package smallmonday provides small-web (i.e., smallweb / smolweb) extensions for the bluemonday HTML sanitizer, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/codeberg.org/reiver/go-smallmonday

GoDoc

Example

Here is an example:

import (
	"codeberg.org/reiver/go-smallmonday"
	"github.com/microcosm-cc/bluemonday"
)

// ...

policy := bluemonday.NewPolicy()

smallmonday.AllowAudio(policy)
smallmonday.AllowRDFa(policy)
smallmonday.AllowVideo(policy)

// ...

sanitizedHTML := policy.Sanitize(html)

Import

To import package smallmonday use import code like the following:

import "codeberg.org/reiver/go-smallmonday"

Installation

To install package smallmonday do the following:

GOPROXY=direct go get codeberg.org/reiver/go-smallmonday

Author

Package smallmonday was written by Charles Iliya Krempeaux