开发者

UIWebView Xhmtl parse error but safari don't

I have an application showing standard html pages. I use UIWebView for html. When using safari fo开发者_JAVA技巧r pages no problem. When I use uiwebview the page does not load.

Error message(UIWebView)

This page contains the following errors:
error on line 230 at column 33: AttValue: " or ' expected

Below is rendering of the page up to the first error

Different page different xhtml error.


I realased that ipad simulator load page properly too.


I had a similar issue. I resolved it by explicitly setting the MIME type of the page to be "text/html". Otherwise it was being parsed in the UIWebview as xhtml.

eg in ASP.NET in your masterpage set

<% Response.ContentType = "text/html"; %>

Also check your <!DOCTYPE> isn't claiming to be xhtml.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜