Android examples for User Interface:WebView URL
encode Html with URLEncoder for WebView
import android.util.Log; import java.net.URLEncoder; public class Main{ public static final String UTF8 = "utf-8"; public static String encodeHtml(String content) { try {//from w w w.jav a 2 s .c o m return URLEncoder.encode(content, UTF8).replaceAll("\\+", " "); } catch (Exception e) { Log.e(WebUtils.class.getName(), "Error encoding html in UTF8 : " + e.getMessage()); return content; } } }