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
d34b1c29
Kaydet (Commit)
d34b1c29
authored
May 19, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1161 from erikr/urlize-additional-test
Fixed #19070 -- Additional test for urlize and brackets
üst
f7467181
1927bf7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests.py
tests/defaultfilters/tests.py
+3
-3
No files found.
tests/defaultfilters/tests.py
Dosyayı görüntüle @
d34b1c29
...
@@ -306,13 +306,13 @@ class DefaultFiltersTests(TestCase):
...
@@ -306,13 +306,13 @@ class DefaultFiltersTests(TestCase):
self
.
assertEqual
(
urlize
(
'(Go to http://www.example.com/foo.)'
),
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>.)'
)
'(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)'
)
# Check urlize
doesn't crash when square bracket is appended to url
(#19070)
# Check urlize
handles brackets properly
(#19070)
self
.
assertEqual
(
urlize
(
'[see www.example.com]'
),
self
.
assertEqual
(
urlize
(
'[see www.example.com]'
),
'[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]'
)
'[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]'
)
# Check urlize doesn't crash when square bracket is prepended to url (#19070)
self
.
assertEqual
(
urlize
(
'see test[at[example.com'
),
self
.
assertEqual
(
urlize
(
'see test[at[example.com'
),
'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>'
)
'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>'
)
self
.
assertEqual
(
urlize
(
'[http://168.192.0.1](http://168.192.0.1)'
),
u'[<a href="http://168.192.0.1](http://168.192.0.1)" rel="nofollow">http://168.192.0.1](http://168.192.0.1)</a>'
)
# Check urlize works with IPv4/IPv6 addresses
# Check urlize works with IPv4/IPv6 addresses
self
.
assertEqual
(
urlize
(
'http://192.168.0.15/api/9'
),
self
.
assertEqual
(
urlize
(
'http://192.168.0.15/api/9'
),
...
...
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