Skip to content

Commit

Permalink
fix CharacterReader's incorrect handling of single quote in double qu…
Browse files Browse the repository at this point in the history
…oted attributes
  • Loading branch information
Simeng-H committed Nov 9, 2023
1 parent 379dae2 commit 0eebaaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/jsoup/parser/CharacterReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,12 @@ String consumeAttributeQuoted(final boolean single) {
break OUTER;
case '\'':
if (single) break OUTER;
break;
case '"':
if (!single) break OUTER;
default:
pos++;
break;
}
pos++;
}
bufPos = pos;
return pos > start ? cacheString(charBuf, stringCache, start, pos -start) : "";
Expand Down

0 comments on commit 0eebaaf

Please sign in to comment.