<%page args="artist, image, shortbio, fullbio, stylesheet, datasource" />
<%!
    import re
    import cgi
    remove_links = re.compile ('</?a[^>]*> ',re.VERBOSE)
    
    def cleanup(text):
        if text is None:
            return _("No information available")
        text = remove_links.sub ('', text)
        text = text.replace('\n', '</p><p>')
        return text
%>
<html>
<head>
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<link rel="stylesheet" href="${stylesheet}" type="text/css" />
</head>
<body class="artist">
%if error is None:
<h1>${artist | h}</h1>
<img src="${image | h}" />
<div id="shortbio" class="shown">
<% shortbio = cleanup(shortbio) %>
<p>${shortbio}</p>
</div>
<p>${datasource}</p>
%else:
<h1>${ _("Unable to retrieve artist information:") }</h1>
<p class="error">${error | h}</p>
%endif
</body>
</html>
