My html string is like this:
Solved, gimme a lot of "helpful" for this answer because it's really a nasty webview bug and I think my answer will help a lot of you!
If your html page contains, indeed, one of "%","\" or "#" characters, loadData() method will fail!! So you have to manually replace these chr and here's my class:
public class BuglessWebView extends WebView{
public BuglessWebView(Context context) {
super(context);
}
public BuglessWebView(Context context,AttributeSet attributes){
super(context,attributes);
}
public BuglessWebView(Context context,AttributeSet attributes,int defStyles){
super(context,attributes,defStyles);
}
@Override
public void loadData(String data, String mimeType, String encoding) {
super.loadData(solveBug(data), mimeType, encoding);
}
private String solveBug(String data){
StringBuilder sb = new StringBuilder(data.length()+100);
char[] dataChars = data.toCharArray();
for(int i=0;i
here's discussion link on google code: http://code.google.com/p/android/issues/detail?id=1733