Switch to unified view

a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
...
...
130
            .limit(pagesize)
130
            .limit(pagesize)
131
            .all())
131
            .all())
132
        if not results: break
132
        if not results: break
133
        yield results
133
        yield results
134
        page += 1
134
        page += 1
135
136
def lsub_utf8(s, n):
137
    '''Useful for returning n bytes of a UTF-8 string, rather than characters'''
138
    while len(s) > n:
139
        k = n
140
        while (ord(s[k]) & 0xc0) == 0x80:
141
            k -= 1
142
        return s[:k]
143
    return s
144
135
145
136
class AntiSpam(object):
146
class AntiSpam(object):
137
    '''Helper class for bot-protecting forms'''
147
    '''Helper class for bot-protecting forms'''
138
    honey_field_template=string.Template('''<p class="$honey_class">
148
    honey_field_template=string.Template('''<p class="$honey_class">
139
    <label for="$fld_id">You seem to have CSS turned off.
149
    <label for="$fld_id">You seem to have CSS turned off.