comparison MoinMoin/wikiutil.py @ 2760:d373e273cd7b

merged main
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 25 Aug 2007 17:27:14 +0200
parents 4c95862bf9ef 03e4091531be
children 1134a5cc12c2
comparison
equal deleted inserted replaced
2759:fe6098e2a895 2760:d373e273cd7b
253 @param text: unicode text to clean 253 @param text: unicode text to clean
254 @rtype: unicode 254 @rtype: unicode
255 @return: cleaned text 255 @return: cleaned text
256 """ 256 """
257 # we only have input fields with max 200 chars, but spammers send us more 257 # we only have input fields with max 200 chars, but spammers send us more
258 l = len(text) 258 length = len(text)
259 if l == 0 or l > max_len: 259 if length == 0 or length > max_len:
260 return u'' 260 return u''
261 else: 261 else:
262 return text.translate(config.clean_input_translation_map) 262 return text.translate(config.clean_input_translation_map)
263 263
264 264
2252 2252
2253 verb, args = (line[1:] + ' ').split(' ', 1) # split at the first blank 2253 verb, args = (line[1:] + ' ').split(' ', 1) # split at the first blank
2254 pi.append((verb.lower(), args.strip())) 2254 pi.append((verb.lower(), args.strip()))
2255 2255
2256 return pi, body 2256 return pi, body
2257