Commit 643fd16
html: fix SOLIDUS '/' handling in attribute parsing
Calling the Tokenizer with HTML elements containing SOLIDUS (/) character
in the attribute name results in incorrect tokenization.
This is due to violation of the following rule transitions in the WHATWG spec:
- https://html.spec.whatwg.org/multipage/parsing.html#attribute-name-state,
where we are not reconsuming the character if '/' is encountered
- https://html.spec.whatwg.org/multipage/parsing.html#after-attribute-name-state,
where we are not switching to self closing state
Fixes golang/go#63402
Change-Id: I90d998dd8decde877bd63aa664f3657aa6161024
GitHub-Last-Rev: 3546db8
GitHub-Pull-Request: #195
Reviewed-on: https://go-review.googlesource.com/c/net/+/533518
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: David Chase <drchase@google.com>1 parent 73e4b50 commit 643fd16
2 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | 913 | | |
917 | 914 | | |
918 | 915 | | |
919 | 916 | | |
920 | 917 | | |
921 | 918 | | |
922 | 919 | | |
923 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
924 | 923 | | |
925 | 924 | | |
926 | 925 | | |
| |||
939 | 938 | | |
940 | 939 | | |
941 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
942 | 946 | | |
943 | 947 | | |
944 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
604 | 619 | | |
605 | 620 | | |
606 | 621 | | |
| |||
0 commit comments