Commit 3546db8
committed
html: fix SOLIDUS '/' handling in attribute parsing
Calling the Tokenizer with HTML element containing SOLIDUS (/) 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 (we are not reconsuming the character if '/' is encountered)
- https://html.spec.whatwg.org/multipage/parsing.html#after-attribute-name-state (we are not switching to self closing state)
Fixes golang/go#63402
Signed-off-by: Maciej Mionskowski <maciej@mionskowski.pl>1 parent 88194ad commit 3546db8
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