Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stringByRemovingNewLinesAndWhitespace removes required chars in feed item link #69

Open
giaesp opened this issue Mar 6, 2013 · 3 comments

Comments

@giaesp
Copy link

giaesp commented Mar 6, 2013

The code

NSString *processedText = [currentText stringByRemovingNewLinesAndWhitespace];

in MWFeedParser.m (line 611) seems to remove required chars.
I had problem with some urls in item link similar to

http://www.myfeed.com/node/1062190

The url was changed in

http://www.myfeed.com/node/ 62 90

(with whitespace)

@giaesp
Copy link
Author

giaesp commented Mar 6, 2013

The same using method stringByConvertingHTMLToPlainText

@alexkilty
Copy link

Yep had the same problem, just add this around line 600 before the switch(feedType) and you should be good.

NSString *processedText = [[NSString alloc] init];
            if ([currentPath isEqualToString:@"/rss/channel/item/link"] || [currentPath isEqualToString:@"/rdf:RDF/item/link"] || [currentPath isEqualToString:@"/feed/entry/link"]) {
                 processedText = currentText;
            }else
            {
            // Remove newlines and whitespace from currentText
                processedText = [currentText stringByRemovingNewLinesAndWhitespace];
            }

@mwaterfall
Copy link
Owner

Sorry for the slow reply. That's very strange, I'm not sure why this should be happening. Do you have an example string that I can call stringByRemovingNewLinesAndWhitespace on to reproduce this issue? The above link text (http://www.myfeed.com/node/1062190) works fine in my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants