diff --git a/lib/get_answer.py b/lib/get_answer.py index fbc39c7..d84d3d4 100644 --- a/lib/get_answer.py +++ b/lib/get_answer.py @@ -282,7 +282,12 @@ def _get_answer_for_question(topic): Find answer for the `topic` question. """ - topic_words = topic.replace('+', ' ').strip().split() + topic_words = topic.replace('+', ' ').strip() + # some clients send queries with - instead of + so we have to rewrite them to + topic = re.sub(r"(?