Use replaceFirst() rather than replaceAll() when parsing subscribe on android URLs

This commit is contained in:
txtd 2020-01-07 21:23:16 +01:00
parent 9f363540fb
commit 8520900597
1 changed files with 2 additions and 1 deletions

View File

@ -134,8 +134,9 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
} else {
Log.d(TAG, "Activity was started with url " + feedUrl);
setLoadingLayout();
//Remove subscribeonandroid.com from feed URL in order to subscribe to the actual feed URL
if(feedUrl.contains("subscribeonandroid.com")){
feedUrl = feedUrl.replaceAll("((www.)?(subscribeonandroid.com/))","");
feedUrl = feedUrl.replaceFirst("((www.)?(subscribeonandroid.com/))","");
}
if (savedInstanceState == null) {
startFeedDownload(feedUrl, null, null);