Fix an issue where creating factoids that contain '>' or '|' could be eithe fail, or be interpreted as a redirection

This commit is contained in:
tsimpson 2012-05-10 13:43:25 +01:00
parent a3027d3eea
commit fcbe5e92ec

View File

@ -224,7 +224,11 @@ class Encyclopedia(callbacks.Plugin):
rettext = text[:]
hasPipe = False
hasRedir = False
# Test for factoid creation/edit before continuing.
if re.match(r'[^\s]+\sis\s(?:<(?:reply|alias)>)?\s*.*>', text, re.I) is not None:
return (rettext, target, retmsg)
if text.startswith('tell '):
text = ' ' + text