Skip to content

Commit

Permalink
HTML: fix whitespace collapsing after invalid character reference, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Oct 24, 2024
1 parent f6e543c commit 3ce00d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/fsnotify/fsnotify v1.7.0
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52
github.com/tdewolff/parse/v2 v2.7.18
github.com/tdewolff/parse/v2 v2.7.19
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52 h1:bHOA+qzNf3CwchHAIA1k68QgERWiOgZMIh3qoOB3DzA=
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52/go.mod h1:e1dkYfBKpwfFhwXWrQpEU2ClFgxYOT4SrHd6fKD7nIE=
github.com/tdewolff/parse/v2 v2.7.18 h1:uSqjEMT2lwCj5oifBHDcWU2kN1pbLrRENgFWDJa57eI=
github.com/tdewolff/parse/v2 v2.7.18/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/parse/v2 v2.7.19 h1:7Ljh26yj+gdLFEq/7q9LT4SYyKtwQX4ocNrj45UCePg=
github.com/tdewolff/parse/v2 v2.7.19/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
Expand Down
1 change: 1 addition & 0 deletions html/html_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func TestHTML(t *testing.T) {
{`<input placeholder=" a " value=" b ">`, `<input placeholder=" a " value=" b ">`},
{`a <strike> b </strike> c`, `a <strike>b </strike>c`},
{`a <svg>`, `a <svg>`},
{"<h5>\n Lorem & ipsum\n dolor sid amet\n</h5>", "<h5>Lorem & ipsum\ndolor sid amet</h5>"},

// from HTML Minifier
{`<DIV TITLE="blah">boo</DIV>`, `<div title=blah>boo</div>`},
Expand Down

0 comments on commit 3ce00d7

Please sign in to comment.