Tauno T wrote:
> I have a problem with WebView.
> If I call loadData() with a String parameter that has an anchor with a
> href that contains the symbol "#" then the WebView will not render
> anything after that statement.
> 
> For example:
> loadData("<a href=\"#tips\">Jump to the Useful Tips Section</a><a name=
> \"tips\">Useful Tips Section</a>", "text/html", "utf-8");
> IS NOT working.
> 
> loadData("<a href=\"http://google.com\";>Jump to the Useful Tips
> Section</a><a name=\"tips\">Useful Tips Section</a>", "text/html",
> "utf-8");
> IS working.
> 
> The only difference is the actual link.
> If I save the stuff as a html file on a webserver and open it using
> loadUrl(); then everything works as expected.
> 
> Am I missing something here or is WebView broken?

Try using loadDataWithBaseUrl(), even giving it a totally bogus base URL 
(e.g., fake://this/is/strange). I wound up switching to this mechanism 
based on a related bug report I filed. It got me past a local-access 
security restriction. I don't know if it will help in this case, but 
it's worth a quick check.

Let us know how it works out.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to