Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd6660f

Browse files
author
Edward Z. Yang ext:(%22)
committed
Fix < produces parse errors in attribute states.
1 parentc97c17e commitfd6660f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎SPEC

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
3195
1+
3354
22

33
(this is the last revision of the spec this library has been audited against)

‎library/HTML5/Tokenizer.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,11 @@ public function parse() {
654654
}else {
655655
/* U+0022 QUOTATION MARK (")
656656
U+0027 APOSTROPHE (')
657+
U+003C LESS-THAN SIGN (<)
657658
U+003D EQUALS SIGN (=)
658659
Parse error. Treat it as per the "anything else" entry
659660
below. */
660-
if($char ==='"' ||$char ==="'" ||$char ==='=') {
661+
if($char ==='"' ||$char ==="'" ||$char ==='<' ||$char ==='=') {
661662
$this->emitToken(array(
662663
'type' =>self::PARSEERROR,
663664
'data' =>'invalid-character-in-attribute-name'
@@ -733,9 +734,10 @@ public function parse() {
733734
}else {
734735
/* U+0022 QUOTATION MARK (")
735736
U+0027 APOSTROPHE (')
737+
U+003C LESS-THAN SIGN (<)
736738
Parse error. Treat it as per the "anything else"
737739
entry below. */
738-
if($char ==='"' ||$char ==="'") {
740+
if($char ==='"' ||$char ==="'" ||$char ==='<') {
739741
$this->emitToken(array(
740742
'type' =>self::PARSEERROR,
741743
'data' =>'invalid-character-in-attribute-name'
@@ -820,9 +822,10 @@ public function parse() {
820822
}else {
821823
/* U+0022 QUOTATION MARK (")
822824
U+0027 APOSTROPHE (')
825+
U+003C LESS-THAN SIGN(<)
823826
Parse error. Treat it as per the "anything else"
824827
entry below. */
825-
if($char ==='"' ||$char ==="'") {
828+
if($char ==='"' ||$char ==="'" ||$char ==="<") {
826829
$this->emitToken(array(
827830
'type' =>self::PARSEERROR,
828831
'data' =>'invalid-character-after-attribute-name'
@@ -894,8 +897,9 @@ public function parse() {
894897

895898
}else {
896899
/* U+003D EQUALS SIGN (=)
900+
* U+003C LESS-THAN SIGN (<)
897901
Parse error. Treat it as per the "anything else" entry below. */
898-
if($char ==='=') {
902+
if($char ==='=' ||$char ==='<') {
899903
$this->emitToken(array(
900904
'type' =>self::PARSEERROR,
901905
'data' =>'equals-in-unquoted-attribute-value'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp