app/soc/views/helpers/template_helpers.py
changeset 183 37d98c3cefa5
parent 168 87296bdfc9c6
child 189 1cf3e7531382
equal deleted inserted replaced
182:72f193fb5633 183:37d98c3cefa5
    62   """Returns the given HTML with ampersands, quotes and carets decoded.
    62   """Returns the given HTML with ampersands, quotes and carets decoded.
    63   """ 
    63   """ 
    64   if not isinstance(html, basestring): 
    64   if not isinstance(html, basestring): 
    65     html = str(html) 
    65     html = str(html) 
    66   
    66   
    67   html.replace('&amp;', '&').replace('&lt;', '<')
    67   html.replace('&#39;',"'").replace('&lt;', '<')
    68   html.replace('&gt;', '>').replace('&quot;', '"').replace('&#39;',"'")
    68   html.replace('&gt;', '>').replace('&quot;', '"').replace('&amp;', '&')
    69   return html
    69   return html
    70 
    70 
    71 
    71 
    72 def getSingleIndexedParamValue(request, param_name, values=()):
    72 def getSingleIndexedParamValue(request, param_name, values=()):
    73   """Returns a value indexed by a query parameter in the HTTP request.
    73   """Returns a value indexed by a query parameter in the HTTP request.