2
# User Thomas Waldmann <tw AT waldmann-edv DOT de>
3
# Date Mon Feb 12 00:18:34 2007 +0100
4
# Node ID 0a0730d1bd6b4913a635535d019ec3006f779235
5
# parent: a00d96f3f7cb399f49536c040ece4df28f2b002f
6
added some more protocols, moved them to config.url_schemas
8
--- a/MoinMoin/config.py Wed Feb 07 16:18:01 2007 +0100
9
+++ b/MoinMoin/config.py Mon Feb 12 00:18:34 2007 +0100
10
@@ -36,7 +36,10 @@ page_invalid_chars_regex = re.compile(
15
+url_schemas = ['http', 'https', 'ftp', 'wiki', 'mailto', 'nntp', 'news',
16
+ 'telnet', 'file', 'irc', 'ircs',
17
+ 'webcal', 'ed2k', 'xmpp', 'rootz',
21
"X-(": (15, 15, 0, "angry.png"),
22
--- a/MoinMoin/parser/wiki.py Wed Feb 07 16:18:01 2007 +0100
23
+++ b/MoinMoin/parser/wiki.py Mon Feb 12 00:18:34 2007 +0100
24
@@ -30,11 +30,9 @@ class Parser:
27
PARENT_PREFIX = wikiutil.PARENT_PREFIX
28
- attachment_schemas = ["attachment", "inline", "drawing"]
29
punct_pattern = re.escape(u'''"\'}]|:,.)?!''')
30
- url_pattern = (u'http|https|ftp|nntp|news|mailto|telnet|wiki|file|irc|' +
31
- u'|'.join(attachment_schemas) +
32
- (config.url_schemas and u'|' + u'|'.join(config.url_schemas) or ''))
33
+ attachment_schemas = ["attachment", "inline", "drawing", ]
34
+ url_pattern = u'|'.join(config.url_schemas + attachment_schemas)
37
word_rule = ur'(?:(?<![%(u)s%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s][%(l)s]+){2,})+(?![%(u)s%(l)s]+)' % {
38
--- a/MoinMoin/theme/__init__.py Wed Feb 07 16:18:01 2007 +0100
39
+++ b/MoinMoin/theme/__init__.py Mon Feb 12 00:18:34 2007 +0100
40
@@ -240,8 +240,7 @@ class ThemeBase:
43
# Schemas supported in toolbar links, using [url label] format
44
- linkSchemas = [r'http://', r'https://', r'ftp://', 'mailto:', r'irc://', ] + \
45
- [x + ':' for x in config.url_schemas]
46
+ linkSchemas = [x + ':' for x in config.url_schemas]
48
def splitNavilink(self, text, localize=1):
49
""" Split navibar links into pagename, link to page
50
--- a/docs/CHANGES Wed Feb 07 16:18:01 2007 +0100
51
+++ b/docs/CHANGES Mon Feb 12 00:18:34 2007 +0100
52
@@ -27,6 +27,15 @@ Known main issues:
53
issues, so please DON'T USE THEM except if you want to help debugging
54
and improving it and after having made a backup with some other, proven
55
method. USE BOTH ON YOUR OWN RISK!
59
+ * Added support for ircs, webcal, xmpp, ed2k and rootz protocols - we
60
+ moved all protocols to config.url_schemas, so this is not empty any more.
61
+ It is possible to use these protocols now on wiki pages and in the
62
+ navi_bar. We just generate the URLs, it is up to your browser what it
63
+ does when clicking on those links.