diff --git a/plugins/Alias/config.py b/plugins/Alias/config.py index c049f5139..940d5803f 100644 --- a/plugins/Alias/config.py +++ b/plugins/Alias/config.py @@ -44,6 +44,6 @@ Alias = conf.registerPlugin('Alias') conf.registerGroup(Alias, 'aliases') conf.registerGroup(Alias, 'escapedaliases') conf.registerGlobalValue(Alias, 'validName', - registry.String(r'^[a-z.|!?][a-z0-9.|!]*$', _("""Regex which alias names must match in order to be valid"""))) + registry.String(r'^[^\x00-\x20]+$', _("""Regex which alias names must match in order to be valid"""))) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/plugins/Alias/test.py b/plugins/Alias/test.py index 913b1ab56..f481e4493 100644 --- a/plugins/Alias/test.py +++ b/plugins/Alias/test.py @@ -127,6 +127,13 @@ class AliasTestCase(ChannelPluginTestCase): self.assertNotError('alias add myre "echo s/$1/$2/g"') self.assertResponse('myre foo bar', 's/foo/bar/g') + def testUnicode(self): + self.assertNotError(u'alias add \u200b echo foo') + self.assertResponse(u'\u200b', 'foo') + + self.assertNotError(u'alias add café echo bar') + self.assertResponse(u'café', 'bar') + def testSimpleAliasWithoutArgsImpliesDollarStar(self): self.assertNotError('alias add exo echo') self.assertResponse('exo foo bar baz', 'foo bar baz')