clean urls
This commit is contained in:
parent
896b46a1a1
commit
c562f87059
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ def escape(key):
|
|||
return key.replace('%', '%25').replace('&', '%26').replace('_', '%09').replace(' ', '_').replace('<', '%0E').replace('>', '%0F')
|
||||
|
||||
def escape_slug(key):
|
||||
return key.replace('%', '').replace('&', '-').replace('_', '-').replace(' ', '-').replace('<', '').replace('>', '').lower()
|
||||
key = ox.decode_html(key).replace('%', '').replace('&', '-').replace('_', '-').replace(' ', '-').replace('<', '').replace('>', '').lower()
|
||||
key = key.replace("'", '').replace('"', '').strip()
|
||||
return key
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'import titles from pan.do/ra'
|
||||
|
|
Loading…
Reference in a new issue