Open savchenko opened 6 months ago
Isn't this because you didn't close your <style>
tag? If I remember correctly style tags go on until </style>
is seen regardless of any other tag-like text within the tag, because they may contain text in other languages.
@JelleZijlstra , indeed! Closing <style>
allows the snippet to be parsed. However, isn't it inconsistent with the the behaviour observed when parsing other tags?
For example, this broken HTML is parsed correctly:
<head><title>Rebelious<h1>Heading<a href="https://example.net">example.net
<span>not<a href="https://www.arpa.home">arpa.home<p>Paragraph<h2>and more
The difference is that
Bug report
Bug description:
An example where parsing stops after the
<style color="red">
:Changing a single character in the word "style" restores the normal functionality.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Linked PRs