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
d5012d63
Kaydet (Commit)
d5012d63
authored
Tem 17, 2012
tarafından
Vebjorn Ljosa
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
üst
29132ebd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
html.py
django/utils/html.py
+1
-1
tests.py
tests/regressiontests/defaultfilters/tests.py
+4
-0
No files found.
django/utils/html.py
Dosyayı görüntüle @
d5012d63
...
@@ -13,7 +13,7 @@ from django.utils.functional import allow_lazy
...
@@ -13,7 +13,7 @@ from django.utils.functional import allow_lazy
from
django.utils.text
import
normalize_newlines
from
django.utils.text
import
normalize_newlines
# Configuration for urlize() function.
# Configuration for urlize() function.
TRAILING_PUNCTUATION
=
[
'.'
,
','
,
':'
,
';'
]
TRAILING_PUNCTUATION
=
[
'.'
,
','
,
':'
,
';'
,
'.)'
]
WRAPPING_PUNCTUATION
=
[(
'('
,
')'
),
(
'<'
,
'>'
),
(
'<'
,
'>'
)]
WRAPPING_PUNCTUATION
=
[(
'('
,
')'
),
(
'<'
,
'>'
),
(
'<'
,
'>'
)]
# List of possible strings used for bullets in bulleted lists.
# List of possible strings used for bullets in bulleted lists.
...
...
tests/regressiontests/defaultfilters/tests.py
Dosyayı görüntüle @
d5012d63
...
@@ -297,6 +297,10 @@ class DefaultFiltersTests(TestCase):
...
@@ -297,6 +297,10 @@ class DefaultFiltersTests(TestCase):
self
.
assertEqual
(
urlize
(
'HTTPS://github.com/'
),
self
.
assertEqual
(
urlize
(
'HTTPS://github.com/'
),
'<a href="https://github.com/" rel="nofollow">HTTPS://github.com/</a>'
)
'<a href="https://github.com/" rel="nofollow">HTTPS://github.com/</a>'
)
# Check urlize trims trailing period when followed by parenthesis - see #18644
self
.
assertEqual
(
urlize
(
'(Go to http://www.example.com/foo.)'
),
'(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)'
)
def
test_wordcount
(
self
):
def
test_wordcount
(
self
):
self
.
assertEqual
(
wordcount
(
''
),
0
)
self
.
assertEqual
(
wordcount
(
''
),
0
)
self
.
assertEqual
(
wordcount
(
'oneword'
),
1
)
self
.
assertEqual
(
wordcount
(
'oneword'
),
1
)
...
...
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