fix crash with ActivityNotFound exception when opening urls prefixed by

spaces
This commit is contained in:
Andrew Dolgov 2012-01-26 13:06:06 +03:00
parent 0f3fc36c93
commit 758d73748d
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);