aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/lib/changelog_formatter.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/lib/changelog_formatter.py b/web/lib/changelog_formatter.py
index 35dc5d7..536b0b0 100644
--- a/web/lib/changelog_formatter.py
+++ b/web/lib/changelog_formatter.py
@@ -1,4 +1,5 @@
import re
+import urlparse
from cherrypy.lib.tidy import html_break
from web.lib.links import viewcvs_link, \
@@ -160,7 +161,12 @@ def _pretty_changelog_pass6(changelog):
"""Convert any URL markup to real links"""
def markup(m):
- url = 'http://'+m.group(1)
+ group = m.group(1)
+ url = urlparse.urlparse(group)
+ if not url.scheme:
+ url = 'http://' + m.group(1)
+ else:
+ url = group
return '<a href="%s">%s</a>' % (url, url)
changelog = _single_pass_re_loop(re_m_url, markup, changelog)
return changelog