Skip to content

Batch parsing of inline scripts/stylesheets #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions html5ever/src/tokenizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {

//§ rcdata-state
states::RawData(Rcdata) => loop {
match pop_except_from!(self, input, small_char_set!('\r' '\0' '&' '<' '\n')) {
match pop_except_from!(self, input, small_char_set!('\0' '&' '<')) {
FromSet('\0') => {
self.bad_char_error();
self.emit_char('\u{fffd}');
Expand All @@ -783,7 +783,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {

//§ rawtext-state
states::RawData(Rawtext) => loop {
match pop_except_from!(self, input, small_char_set!('\r' '\0' '<' '\n')) {
match pop_except_from!(self, input, small_char_set!('\0' '<')) {
FromSet('\0') => {
self.bad_char_error();
self.emit_char('\u{fffd}');
Expand All @@ -796,7 +796,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {

//§ script-data-state
states::RawData(ScriptData) => loop {
match pop_except_from!(self, input, small_char_set!('\r' '\0' '<' '\n')) {
match pop_except_from!(self, input, small_char_set!('\0' '<')) {
FromSet('\0') => {
self.bad_char_error();
self.emit_char('\u{fffd}');
Expand All @@ -809,7 +809,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {

//§ script-data-escaped-state
states::RawData(ScriptDataEscaped(Escaped)) => loop {
match pop_except_from!(self, input, small_char_set!('\r' '\0' '-' '<' '\n')) {
match pop_except_from!(self, input, small_char_set!('\0' '-' '<')) {
FromSet('\0') => {
self.bad_char_error();
self.emit_char('\u{fffd}');
Expand All @@ -826,7 +826,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {

//§ script-data-double-escaped-state
states::RawData(ScriptDataEscaped(DoubleEscaped)) => loop {
match pop_except_from!(self, input, small_char_set!('\r' '\0' '-' '<' '\n')) {
match pop_except_from!(self, input, small_char_set!('\0' '-' '<')) {
FromSet('\0') => {
self.bad_char_error();
self.emit_char('\u{fffd}');
Expand Down