Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
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
django
Commits
20c6ba6f
Kaydet (Commit)
20c6ba6f
authored
Haz 18, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24962 -- Added newline to characters escaped by contrib.admin.utils.quote()
Thanks alito for the report and patch.
üst
74261bc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
utils.py
django/contrib/admin/utils.py
+1
-1
tests.py
tests/admin_utils/tests.py
+4
-1
No files found.
django/contrib/admin/utils.py
Dosyayı görüntüle @
20c6ba6f
...
...
@@ -68,7 +68,7 @@ def quote(s):
res
=
list
(
s
)
for
i
in
range
(
len
(
res
)):
c
=
res
[
i
]
if
c
in
""":/_#?;@&=+$,"[]<>
%
\\
"""
:
if
c
in
""":/_#?;@&=+$,"[]<>
%
\
n\
\
"""
:
res
[
i
]
=
'_
%02
X'
%
ord
(
c
)
return
''
.
join
(
res
)
...
...
tests/admin_utils/tests.py
Dosyayı görüntüle @
20c6ba6f
...
...
@@ -9,7 +9,7 @@ from django.contrib import admin
from
django.contrib.admin
import
helpers
from
django.contrib.admin.utils
import
(
NestedObjects
,
display_for_field
,
flatten
,
flatten_fieldsets
,
label_for_field
,
lookup_field
,
label_for_field
,
lookup_field
,
quote
,
)
from
django.db
import
DEFAULT_DB_ALIAS
,
models
from
django.test
import
TestCase
,
override_settings
...
...
@@ -379,3 +379,6 @@ class UtilsTests(TestCase):
}),
)
self
.
assertEqual
(
flatten_fieldsets
(
fieldsets
),
[
'url'
,
'title'
,
'content'
,
'sites'
])
def
test_quote
(
self
):
self
.
assertEqual
(
quote
(
'something
\n
or
\n
other'
),
'something_0Aor_0Aother'
)
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