#95 Website report: links containing special characters broken

3.0
open
Nils Meier
Report (12)
5
2010-11-07
2010-11-07
Gadenz Alex
No

If images (e.g. of individuals) contain special characters (space, german umlauts) in their name, the links to these images are written "as is" to the HTML page. This works if the report is opened locally (at least on my Windows machine) but uploading it to a web site results in not visible images (in Firefox 3.6.12).

A solution (not the best, for sure) that works for me is to encode the URLs used in website.Html using the following method:

private String encodeUrl( String url ) {
String result = url;
try {
// encode
result = URLEncoder.encode( url, "ISO-8859-1" );
// decode some character special to URLs ;-)
result = result.replaceAll( "%2F", "/" );
result = result.replaceAll( "%23", "#" );
result = result.replaceAll( "\\+", "%20" );
}
catch( Exception e )
{
e.printStackTrace();
}
return result;
}

Discussion

  • Bharat
    Bharat
    2012-07-20

    Hi I would also like to work on this bug. Can you assign it to me too?