Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
use feed URL if url not startWith http
Browse files Browse the repository at this point in the history
  • Loading branch information
wyy931 committed Aug 6, 2023
1 parent 8f05896 commit 39d47ae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/ObjC/RSRSSParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ - (NSString *)urlString:(NSString *)s {
if (!feedURL) {
return s;
}
NSURL *baseURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@", feedURL.scheme, feedURL.host]];
if (!baseURL) {
return s;
}
NSURL *resolvedURL = [NSURL URLWithString:s relativeToURL:baseURL];
NSURL *resolvedURL = [NSURL URLWithString:s relativeToURL:feedURL];
if (resolvedURL.absoluteString) {
return resolvedURL.absoluteString;
}
Expand Down

0 comments on commit 39d47ae

Please sign in to comment.