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'
', value, count=1) + value = re.sub(r'\[quote=(.+?)\](.+)\[/quote\]', '', value, count=1) for i in range(25): # same here, shut up value = re.sub(r'\[quote\](.*?)\[/quote\]', r'', value)