mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-07 00:21:04 +00:00
This commit is contained in:
parent
852a6de301
commit
e995bc0e19
5 changed files with 7 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue