http://code.google.com/p/web2py/source/browse/gluon/validators.py#64

def translate(text):
    if text is None:
        return None
    elif isinstance(text,(str,unicode)) and have_current:
        if hasattr(current,'T'):
            return str(current.T(text))
    return str(text)

When text is not an instance of str or unicode, I wonder if we need to 
return str(text) -- maybe instead we can just return text. Then the error 
message could be an HTML helper object or XML() object.

For now, another option is to wrap the returned error message in XML(), but 
that would require some manual hacking after the form has been processed.

Anthony

On Thursday, May 24, 2012 2:47:41 PM UTC-4, Jim Karsten wrote:
>
> I would like to include a link in a validator error_message. The 
> translate() function converts the link such that the raw HTML gets 
> displayed instead. Anyone have any suggestions for how to get around this 
> problem?
>
> Jim Karsten
>

Reply via email to