From fcbe5e92ecb9f49619a2af168ff19c2ee6e0f3e5 Mon Sep 17 00:00:00 2001 From: tsimpson Date: Thu, 10 May 2012 13:43:25 +0100 Subject: [PATCH] Fix an issue where creating factoids that contain '>' or '|' could be eithe fail, or be interpreted as a redirection --- Encyclopedia/plugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Encyclopedia/plugin.py b/Encyclopedia/plugin.py index a1b3552..ad893e3 100644 --- a/Encyclopedia/plugin.py +++ b/Encyclopedia/plugin.py @@ -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