fix urls with spaces crash in combined mode
This commit is contained in:
parent
a121c55e96
commit
f9af447124
@ -378,7 +378,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
if (tt != null) {
|
if (tt != null) {
|
||||||
if (m_combinedMode) {
|
if (m_combinedMode) {
|
||||||
tt.setMovementMethod(LinkMovementMethod.getInstance());
|
tt.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
tt.setText(Html.fromHtml("<a href=\""+article.link.replace("\"", "\\\"")+"\">" + article.title + "</a>"));
|
tt.setText(Html.fromHtml("<a href=\""+article.link.trim().replace("\"", "\\\"")+"\">" + article.title + "</a>"));
|
||||||
} else {
|
} else {
|
||||||
tt.setText(Html.fromHtml(article.title));
|
tt.setText(Html.fromHtml(article.title));
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
if (tt != null) {
|
if (tt != null) {
|
||||||
if (m_combinedMode) {
|
if (m_combinedMode) {
|
||||||
tt.setMovementMethod(LinkMovementMethod.getInstance());
|
tt.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
tt.setText(Html.fromHtml("<a href=\""+article.getString(article.getColumnIndex("link")).replace("\"", "\\\"")+"\">" +
|
tt.setText(Html.fromHtml("<a href=\""+article.getString(article.getColumnIndex("link")).trim().replace("\"", "\\\"")+"\">" +
|
||||||
article.getString(article.getColumnIndex("title")) + "</a>"));
|
article.getString(article.getColumnIndex("title")) + "</a>"));
|
||||||
} else {
|
} else {
|
||||||
tt.setText(Html.fromHtml(article.getString(article.getColumnIndex("title"))));
|
tt.setText(Html.fromHtml(article.getString(article.getColumnIndex("title"))));
|
||||||
|
Loading…
Reference in New Issue
Block a user