fix "read more" links not working properly in embedded browser

bump version
This commit is contained in:
Andrew Dolgov 2013-06-25 10:48:03 +04:00
parent 9c729d9a06
commit 9af5dd1fb5
3 changed files with 23 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="188"
android:versionName="1.8.8" >
android:versionCode="189"
android:versionName="1.8.9" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -286,7 +286,16 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
content += "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></body></html>";
try {
web.loadDataWithBaseURL(m_article.link, content, "text/html", "utf-8", null);
String baseUrl = null;
try {
URL url = new URL(m_article.link);
baseUrl = url.getProtocol() + "://" + url.getHost();
} catch (MalformedURLException e) {
//
}
web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
} catch (RuntimeException e) {
e.printStackTrace();
}

View File

@ -1,5 +1,6 @@
package org.fox.ttrss.offline;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.text.DateFormat;
@ -281,7 +282,16 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
"<body>" + articleContent + "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></body></html>";
try {
web.loadDataWithBaseURL(link, content, "text/html", "utf-8", null);
String baseUrl = null;
try {
URL url = new URL(link);
baseUrl = url.getProtocol() + "://" + url.getHost();
} catch (MalformedURLException e) {
//
}
web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
} catch (RuntimeException e) {
e.printStackTrace();
}