Closed GoogleCodeExporter closed 8 years ago
Going to try below code in DetailsDialog.java
WebView description = (WebView) dialogView.findViewById(R.id.webviewbody);
description.getSettings().setJavaScriptEnabled(true);
Original comment by joesox
on 1 Sep 2010 at 2:15
Original comment by joesox
on 1 Sep 2010 at 2:16
the javascript idea did not work. I tried "description.loadDataWithBaseURL..."
null went away but nothing displayed.
I may need to cache the smiley images but still don't know why hyperlinks do
not display.
Original comment by joesox
on 2 Sep 2010 at 5:24
Fixed in version 1.16. Fixed with encoding and decoding to get past Expat parser
CPForAndroid.java
/** Expat parser strips all of the html tags out of <description> content, this hack preps for WebView */
private String PrepAndEncodeLine(String strLine)
{
String newline = strLine;
//Lets go line by line for easy reading/debugging etc (keep in sequence order)
newline = newline.replace("<a href=\"", "{{a");
newline = newline.replace("<", "[[").replace(">", "]]");
newline = newline.replace("[[div class=\"signature\"]]", "{hr}");
return newline;
}
DetailsDialog.java
/** Expat parser strips all of the html tags out of <description> content, this decodes the hack preps for WebView */
private String DecodeLine(String strLine)
{
String newline = strLine;
//Lets go line by line for easy reading/debugging etc (keep in sequence order)
newline = newline.replace("{{a", "<a href=\"");
newline = newline.replace("[[", "<").replace("]]", ">");
newline = newline.replace("{hr}", "<hr>");
return newline;
}
Original comment by joesox
on 4 Sep 2010 at 2:26
Original issue reported on code.google.com by
joesox
on 31 Aug 2010 at 6:11