3 def strip_colors(str=None):
4 str = re.sub(r'\^x\w\w\w', '', str)
5 str = re.sub(r'\^\d', '', str)
8 def html_colors(str=None):
10 str = re.sub(r'\^x(\w)(\w)(\w)',
11 "<span style='color:#\g<1>\g<1>\g<2>\g<2>\g<3>\g<3>'>", str)
12 str = re.sub(r'\^1', "<span style='color:#FF9900'>", str)
13 str = re.sub(r'\^2', "<span style='color:#33FF00'>", str)
14 str = re.sub(r'\^3', "<span style='color:#FFFF00'>", str)
15 str = re.sub(r'\^4', "<span style='color:#3366FF'>", str)
16 str = re.sub(r'\^5', "<span style='color:#33FFFF'>", str)
17 str = re.sub(r'\^6', "<span style='color:#FF3366'>", str)
18 str = re.sub(r'\^7', "<span style='color:#FFFFFF'>", str)
19 str = re.sub(r'\^8', "<span style='color:#999999'>", str)
20 str = re.sub(r'\^9', "<span style='color:#666666'>", str)
21 str = re.sub(r'\^0', "<span style='color:#333333'>", str)
23 for span in range(len(re.findall(r'\^x\w\w\w|\^\d', orig))):
29 return current_route_url(request, page=page, _query=request.GET)