Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f27b9a74
Kaydet (Commit)
f27b9a74
authored
Şub 01, 2014
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#20288: fix handling of invalid numeric charrefs in HTMLParser.
üst
a479b750
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
parser.py
Lib/html/parser.py
+3
-3
test_htmlparser.py
Lib/test/test_htmlparser.py
+6
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/html/parser.py
Dosyayı görüntüle @
f27b9a74
...
...
@@ -228,9 +228,9 @@ class HTMLParser(_markupbase.ParserBase):
i
=
self
.
updatepos
(
i
,
k
)
continue
else
:
if
";"
in
rawdata
[
i
:]:
#
bail by consuming &#
self
.
handle_data
(
rawdata
[
0
:
2
])
i
=
self
.
updatepos
(
i
,
2
)
if
";"
in
rawdata
[
i
:]:
#
bail by consuming &#
self
.
handle_data
(
rawdata
[
i
:
i
+
2
])
i
=
self
.
updatepos
(
i
,
i
+
2
)
break
elif
startswith
(
'&'
,
i
):
match
=
entityref
.
match
(
rawdata
,
i
)
...
...
Lib/test/test_htmlparser.py
Dosyayı görüntüle @
f27b9a74
...
...
@@ -151,6 +151,12 @@ text
(
"data"
,
"&#bad;"
),
(
"endtag"
,
"p"
),
])
# add the [] as a workaround to avoid buffering (see #20288)
self
.
_run_check
([
"<div>&#bad;</div>"
],
[
(
"starttag"
,
"div"
,
[]),
(
"data"
,
"&#bad;"
),
(
"endtag"
,
"div"
),
])
def
test_unclosed_entityref
(
self
):
self
.
_run_check
(
"&entityref foo"
,
[
...
...
Misc/NEWS
Dosyayı görüntüle @
f27b9a74
...
...
@@ -45,6 +45,8 @@ Core and Builtins
Library
-------
-
Issue
#
20288
:
fix
handling
of
invalid
numeric
charrefs
in
HTMLParser
.
-
Issue
#
20424
:
Python
implementation
of
io
.
StringIO
now
supports
lone
surrogates
.
-
Issue
#
19456
:
ntpath
.
join
()
now
joins
relative
paths
correctly
when
a
drive
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment