Commit 6bb77b76 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

controllers/tag.py use length of tag prefix for truncating

This is the proper way of removing the tag prefix from the query
parent 27df30c0
......@@ -13,6 +13,7 @@ def auto_complete():
if "query" not in request.vars or request.vars["query"][0] != "#":
tags = []
else:
tags = get_tags(db, request.vars["group_id"], request.vars["query"][1:])
prefix = get_tag_prefix()
tags = get_tags(db, request.vars["group_id"], request.vars["query"][len(prefix):])
return tags_to_json(tags)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment