diff --git a/scripts/new-photo-post b/scripts/new-photo-post index 858565e..bc44567 100755 --- a/scripts/new-photo-post +++ b/scripts/new-photo-post @@ -19,7 +19,10 @@ from typing import Optional PHOTOS_CONTENT_DIR = 'content/photos' def slugify(s): - return re.sub(r'[‘’“”]', '', re.sub(r'\s+', '-', s.strip().lower())) + s = s.strip().lower() + s = re.sub(r'\s+', '-', s) + s = re.sub(r'[‘’“”"\'()]', '', s) + return s def parse_args(argv, *a, **kw): parser = argparse.ArgumentParser(*a, **kw)