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
54ad7e39
Kaydet (Commit)
54ad7e39
authored
Tem 04, 2013
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18347: ElementTree's html serializer now preserves the case of closing tags.
üst
be9c8414
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
test_xml_etree.py
Lib/test/test_xml_etree.py
+7
-0
ElementTree.py
Lib/xml/etree/ElementTree.py
+3
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_xml_etree.py
Dosyayı görüntüle @
54ad7e39
...
@@ -751,6 +751,13 @@ class ElementTreeTest(unittest.TestCase):
...
@@ -751,6 +751,13 @@ class ElementTreeTest(unittest.TestCase):
'<html><link><script>1 < 2</script></html>
\n
'
)
'<html><link><script>1 < 2</script></html>
\n
'
)
self
.
assertEqual
(
serialize
(
e
,
method
=
"text"
),
'1 < 2
\n
'
)
self
.
assertEqual
(
serialize
(
e
,
method
=
"text"
),
'1 < 2
\n
'
)
def
test_issue18347
(
self
):
e
=
ET
.
XML
(
'<html><CamelCase>text</CamelCase></html>'
)
self
.
assertEqual
(
serialize
(
e
),
'<html><CamelCase>text</CamelCase></html>'
)
self
.
assertEqual
(
serialize
(
e
,
method
=
"html"
),
'<html><CamelCase>text</CamelCase></html>'
)
def
test_entity
(
self
):
def
test_entity
(
self
):
# Test entity handling.
# Test entity handling.
...
...
Lib/xml/etree/ElementTree.py
Dosyayı görüntüle @
54ad7e39
...
@@ -1039,15 +1039,15 @@ def _serialize_html(write, elem, qnames, namespaces):
...
@@ -1039,15 +1039,15 @@ def _serialize_html(write, elem, qnames, namespaces):
# FIXME: handle boolean attributes
# FIXME: handle boolean attributes
write
(
"
%
s=
\"
%
s
\"
"
%
(
qnames
[
k
],
v
))
write
(
"
%
s=
\"
%
s
\"
"
%
(
qnames
[
k
],
v
))
write
(
">"
)
write
(
">"
)
tag
=
tag
.
lower
()
l
tag
=
tag
.
lower
()
if
text
:
if
text
:
if
tag
==
"script"
or
tag
==
"style"
:
if
ltag
==
"script"
or
l
tag
==
"style"
:
write
(
text
)
write
(
text
)
else
:
else
:
write
(
_escape_cdata
(
text
))
write
(
_escape_cdata
(
text
))
for
e
in
elem
:
for
e
in
elem
:
_serialize_html
(
write
,
e
,
qnames
,
None
)
_serialize_html
(
write
,
e
,
qnames
,
None
)
if
tag
not
in
HTML_EMPTY
:
if
l
tag
not
in
HTML_EMPTY
:
write
(
"</"
+
tag
+
">"
)
write
(
"</"
+
tag
+
">"
)
if
elem
.
tail
:
if
elem
.
tail
:
write
(
_escape_cdata
(
elem
.
tail
))
write
(
_escape_cdata
(
elem
.
tail
))
...
...
Misc/NEWS
Dosyayı görüntüle @
54ad7e39
...
@@ -41,6 +41,9 @@ Core and Builtins
...
@@ -41,6 +41,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #18347: ElementTree'
s
html
serializer
now
preserves
the
case
of
closing
tags
.
-
Issue
#
17261
:
Ensure
multiprocessing
's proxies use proper address.
-
Issue
#
17261
:
Ensure
multiprocessing
's proxies use proper address.
- Issue #18343: faulthandler.register() now keeps the previous signal handler
- Issue #18343: faulthandler.register() now keeps the previous signal handler
...
...
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