kopia lustrzana https://github.com/wagtail/wagtail
rodzic
852a6de301
commit
e995bc0e19
|
@ -14,7 +14,7 @@ Changelog
|
|||
* Fix: Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)
|
||||
* Fix: Removed alignment options (deprecated in HTML and not rendered by Wagtail) from `TableBlock` context menu (Moritz Pfeiffer)
|
||||
* Fix: Fixed incorrect CSS path on ModelAdmin's "choose a parent page" view
|
||||
|
||||
* Fix: Prevent empty redirect by overnormalisation (Franklin Kingma, Ludolf Takens)
|
||||
|
||||
1.5.2 (08.06.2016)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -143,6 +143,8 @@ Contributors
|
|||
* Jonny Scholes
|
||||
* Richard McMillan
|
||||
* Johannes Spielmann
|
||||
* Franklin Kingma
|
||||
* Ludolf Takens
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -29,6 +29,7 @@ Bug fixes
|
|||
* Email templates and document uploader now support custom ``STATICFILES_STORAGE`` (Jonny Scholes)
|
||||
* Removed alignment options (deprecated in HTML and not rendered by Wagtail) from ``TableBlock`` context menu (Moritz Pfeiffer)
|
||||
* Fixed incorrect CSS path on ModelAdmin's "choose a parent page" view
|
||||
* Prevent empty redirect by overnormalisation
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -64,7 +64,7 @@ class Redirect(models.Model):
|
|||
if not path.startswith('/'):
|
||||
path = '/' + path
|
||||
|
||||
if path.endswith('/'):
|
||||
if path.endswith('/') and len(path) > 1:
|
||||
path = path[:-1]
|
||||
|
||||
# Parameters must be sorted alphabetically
|
||||
|
|
|
@ -76,6 +76,8 @@ class TestRedirects(TestCase):
|
|||
'/Hello/world.htm;fizz=three;buzz=five?foo=Bar&Baz=quux2'
|
||||
))
|
||||
|
||||
self.assertEqual('/', normalise_path('/')) # '/' should stay '/'
|
||||
|
||||
# Normalise some rubbish to make sure it doesn't crash
|
||||
normalise_path('This is not a URL')
|
||||
normalise_path('//////hello/world')
|
||||
|
|
Ładowanie…
Reference in New Issue