[small fixes, support for backslash escape raph.levien@gmail.com**20061225090947] { hunk ./barghest.py 151 - ["
It's not much, but it's home.
", - 'Cookie = ' + `ctx.cookie` + '
', + ['Log in below, or go straight to the wiki.
', hunk ./barghest.py 196 + if page in ('RecentChanges',): return True hunk ./barghest.py 198 - c.execute('select uname, mtime from log where seqno = (select max(seqno) from log where what = %s)', page) - return c.fetchone() + if ctx.dbversion >= [4, 1, 0]: + c.execute('select uname, mtime from log where seqno = (select max(seqno) from log where what = %s)', page) + return c.fetchone() + else: + c.execute('select max(seqno) from log where what = %s', page) + response = c.fetchone() + if response: + c.execute('select uname, mtime from log where seqno = %s', response) + return c.fetchone() hunk ./barghest.py 210 - if False and ctx.dbversion >= [4, 1, 0]: + if ctx.dbversion >= [4, 1, 0]: hunk ./barghest.py 230 + url_re = re.compile(r'^[a-z\+]*://') + if url_re.match(str): + return '' + htmlquote(str) + '' hunk ./barghest.py 237 - return pref + 'href="' + urlquoteplus(str) + '">' + htmlquote(str) + '' + if str == '': + str = './' + textstr = 'the home page' + else: + textstr = htmlquote(str) + return pref + 'href="' + urlquoteplus(str) + '">' + textstr + '' hunk ./barghest.py 250 - special_re = re.compile(r'[#_\*<>&\[]|\[\[') + special_re = re.compile(r'[#_\*<>&\[\\]|\[\[') hunk ./barghest.py 291 + elif g == '\\': + if mend < len(line) and line[mend] in '\\_#[]*': + rline += line[mend] + pos = mend + 1 + else: + rline += g + pos = mend hunk ./barghest.py 319 - ctx.write('Thank you for your update to ' + htmlquote(page) + '.
') + ctx.write('Thank you for your update to ' + wikilink(ctx, page) + '.
') }