Preserve equals signs in answer values

This commit is contained in:
Miroslav Štampar 2026-06-02 13:58:19 +02:00
parent 8cac5fdab6
commit 4caeff9cf4
3 changed files with 8 additions and 5 deletions

View file

@ -1147,8 +1147,11 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
return conf.answers
for item in conf.answers.split(','):
question = item.split('=')[0].strip()
answer = item.split('=')[1] if len(item.split('=')) > 1 else None
if '=' in item:
question, answer = item.split('=', 1)
question = question.strip()
else:
question, answer = item.strip(), None
if answer and question.lower() in message.lower():
retVal = getUnicode(answer, UNICODE_ENCODING)
elif answer is None and retVal: