fix crash with ActivityNotFound exception when opening urls prefixed by
spaces
This commit is contained in:
parent
0f3fc36c93
commit
758d73748d
@ -86,7 +86,7 @@ public class ArticleFragment extends Fragment {
|
||||
titleStr = m_article.title;
|
||||
|
||||
title.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
title.setText(Html.fromHtml("<a href=\""+m_article.link.replace("\"", "\\\"")+"\">" + titleStr + "</a>"));
|
||||
title.setText(Html.fromHtml("<a href=\""+m_article.link.trim().replace("\"", "\\\"")+"\">" + titleStr + "</a>"));
|
||||
}
|
||||
|
||||
WebView web = (WebView)view.findViewById(R.id.content);
|
||||
|
@ -91,7 +91,7 @@ public class OfflineArticleFragment extends Fragment {
|
||||
titleStr = m_cursor.getString(m_cursor.getColumnIndex("title"));
|
||||
|
||||
title.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
title.setText(Html.fromHtml("<a href=\""+m_cursor.getString(m_cursor.getColumnIndex("link")).replace("\"", "\\\"")+"\">" + titleStr + "</a>"));
|
||||
title.setText(Html.fromHtml("<a href=\""+m_cursor.getString(m_cursor.getColumnIndex("link")).trim().replace("\"", "\\\"")+"\">" + titleStr + "</a>"));
|
||||
}
|
||||
|
||||
WebView web = (WebView)view.findViewById(R.id.content);
|
||||
|
Loading…
Reference in New Issue
Block a user