mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
click handlers for content links
This commit is contained in:
parent
c27de6bcab
commit
899b4f978c
27 changed files with 265 additions and 83 deletions
|
@ -14,11 +14,11 @@ package util
|
|||
import "testing"
|
||||
|
||||
func TestHTMLEncoding(t *testing.T) {
|
||||
html(t, "<script>alert('test')</script>", "<script>alert('test')</script>")
|
||||
testHTML(t, "<script>alert('test')</script>", "<script>alert('test')</script>")
|
||||
text(t, "<script>alert('test')</script>", "<script>alert('test')</script>")
|
||||
}
|
||||
|
||||
func html(t *testing.T, in, out string) {
|
||||
func testHTML(t *testing.T, in, out string) {
|
||||
got := EncodeHTMLString(in)
|
||||
if got != out {
|
||||
t.Errorf("EncodeHTMLString `%s` got `%s` expected `%s`\n", in, got, out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue