Remove lang flag from spec URLs

This commit is contained in:
str4d
2015-11-25 01:45:49 +00:00
parent d4a964ecb4
commit b7bd2b3e45

View File

@@ -179,9 +179,12 @@ def pull_lang(endpoint, values):
def set_lang(endpoint, values):
if not values:
return
if endpoint == 'static':
if endpoint == 'static' or \
endpoint.startswith('spec_'):
# Static urls shouldn't have a lang flag
# (causes complete reload on lang change)
# Spec urls shouldn't have a lang flag
# (adds a spurious ?lang=xx to the url)
return
if 'lang' in values:
return