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
23984cf9
Kaydet (Commit)
23984cf9
authored
Nis 03, 2014
tarafından
Tomasz Wysocki
Kaydeden (comit)
Claude Paroz
Nis 03, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[1.7.x] Refactored and commented strip_tags utility
Backport of
c28beb42
from master.
üst
7b3a221a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
html.py
django/utils/html.py
+6
-6
No files found.
django/utils/html.py
Dosyayı görüntüle @
23984cf9
...
...
@@ -161,15 +161,15 @@ def _strip_once(value):
def
strip_tags
(
value
):
"""Returns the given HTML with all tags stripped."""
while
True
:
if
not
(
'<'
in
value
or
'>'
in
value
):
return
value
# Note: in typical case this loop executes _strip_once once. Loop condition
# is redundant, but helps to reduce number of executions of _strip_once.
while
'<'
in
value
and
'>'
in
value
:
new_value
=
_strip_once
(
value
)
if
new_value
==
value
:
# _strip_once was not able to detect more tags
return
value
else
:
value
=
new_
value
break
value
=
new_value
return
value
strip_tags
=
allow_lazy
(
strip_tags
)
...
...
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