~ubuntu-branches/ubuntu/hardy/moin/hardy-security

« back to all changes in this revision

Viewing changes to debian/patches/00815_add_more_protocols.patch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-06 17:44:41 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206174441-20bxkrbqdglgh4l7
Tags: 1.5.8-5ubuntu1
* Merge with Debian; remaining changes:
  - Suggest python-xml (needed for DocBook rendering). LP: #31728.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# HG changeset patch
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
7
 
 
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(
11
 
 
12
 
 # Other stuff
13
 
 umask = 0770
14
 
-url_schemas = []
15
 
+url_schemas = ['http', 'https', 'ftp', 'wiki', 'mailto', 'nntp', 'news',
16
 
+               'telnet', 'file', 'irc', 'ircs',
17
 
+               'webcal', 'ed2k', 'xmpp', 'rootz',
18
 
+              ]
19
 
 
20
 
 smileys = {
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:
25
 
 
26
 
     # some common strings
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)
35
 
 
36
 
     # some common rules
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:
41
 
         return html
42
 
 
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]
47
 
 
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!
56
 
+
57
 
+Version 1.5.current:
58
 
+  New features:
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.
64
 
+
65
 
 
66
 
 Version 1.5.7:
67
 
   New features:
68