From 4321607b7bcddfd37e46709194d6952a9696aa91 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 May 2015 11:48:17 +0200 Subject: [PATCH] make the username in quotes link to the userprofile --- generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator.py b/generator.py index e113377..1a30195 100755 --- a/generator.py +++ b/generator.py @@ -22,7 +22,7 @@ def url_replacer(value): return value.replace('/', '_').replace(' ', '_').replace('?', '').replace('<', '').replace('>', '') def user_replacer(match): - return '[url=../../user/' +url_replacer(match.group(2)) + '.html]' + match.group(2) + '[/url]' + return '[url=../../user/' + url_replacer(match.group(2)) + '.html]' + match.group(2) + '[/url]' def tohtml(value): value = value.replace('{{baseurl}}', 'static') @@ -37,7 +37,7 @@ def tohtml(value): value = re.sub(r'\[img\](.*?)\[/img\]', r'', value) for i in range(25): # ugly hack but works good enough - value = re.sub(r'\[quote=(.+?)\](.+)\[/quote\]', r'
\1\2
', value, count=1) + value = re.sub(r'\[quote=(.+?)\](.+)\[/quote\]', '
' + '' + r'\1\2
', value, count=1) for i in range(25): # same here, shut up value = re.sub(r'\[quote\](.*?)\[/quote\]', r'
\1
', value)