diff --git a/code/shop.py b/code/shop.py
index ab1b72a..3c7d84a 100644
--- a/code/shop.py
+++ b/code/shop.py
@@ -35,7 +35,7 @@ BOLDFINDER = re.compile(r"\*([^\*]+)\*")
CODEFINDER = re.compile(r"\`([^\`]+)\`")
CHECKBOX_DOKUWIKI_TICKED = re.compile(r"]*)>([^<]+)")
CHECKBOX_DOKUWIKI_UNTICKED = re.compile(r"([^<]+)")
-SHOPNAME_INVALIDCHARS = re.compile("[^A-Za-z0-9_-]+")
+SHOPNAME_INVALIDCHARS = re.compile("[^A-Za-z0-9_]+")
# create our little application :)
app = Flask(__name__)
@@ -121,8 +121,8 @@ def scan_for_new_documents(id):
existing.append(row[1])
for row in os.listdir(data_dir):
if row.endswith(".txt"):
- if row[:-3] not in existing:
- non_existing.append(row[:-3])
+ if row[:-4] not in existing:
+ non_existing.append(row[:-4])
for shop in non_existing:
g.db.execute("insert into shops (shop,owner) values (?, ?)", [shop, id])
g.db.commit()
@@ -147,7 +147,7 @@ def checkbox_add(item):
if MARKDOWN_STYLE == "markdown":
return f"[ ] {item}" + "\n"
if MARKDOWN_STYLE == "dokuwiki":
- return f"{item}" + "\n"
+ return f"- {item}" + "\n"
def untick(item):
@@ -425,7 +425,7 @@ def add_shop():
import re
import string
- shopname = SHOPNAME_INVALIDCHARS.sub("", request.form["shop"])
+ shopname = SHOPNAME_INVALIDCHARS.sub("", request.form["shop"].lower())
if shopname == "":
flash("Shop name empty!")