fix offline fragment

This commit is contained in:
Lennart Weller 2013-05-22 20:42:42 +02:00
parent d3e355e83b
commit 9081e4d553

View File

@ -1,5 +1,7 @@
package org.fox.ttrss.offline;
import java.net.URI;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -125,8 +127,10 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
@Override
public void onClick(View v) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse(link.trim()));
URL url = new URL(link.trim());
String uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(),
url.getPort(), url.getPath(), url.getQuery(), url.getRef()).toString();
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();