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

TextAsHtml property throws an exception when TweetMode is 'Extended' #80

Open
mauroandrea opened this issue Dec 10, 2019 · 4 comments
Open

Comments

@mauroandrea
Copy link

Hi guys.

I'm updating an old site from one of our customers and I replaced the old TweetSharp library with yours so I can remove the 140 char limit.

I saw the property 'TweetMode' in ListTweetsOnUserTimelineOptions, and since I changed it to 'Extended' I'm getting an exception when trying to use the property TextAsHtml.

If I use TweetMode as Compatibility I get the following:

FullText: null
Text: Tweet truncated to 140 chars including the URL
TextAsHtml: Truncated tweet with HTML for URL and hashtags

If I use TweetMode as Extended I get the following:

FullText: full tweet in plain-text
Text: null
TextAsHtml: throws an exception

Here's part of the exception I'm getting:

System.ArgumentNullException: Value cannot be null.
Parameter name: str
at System.Globalization.StringInfo.ParseCombiningCharacters(String str)
at TweetSharp.StringExtensions.ParseTextWithEntities(ITweetable tweetable)
at TweetSharp.TwitterStatus.get_TextAsHtml()

The rest of the stack trace refers to our client project, which I can't disclose due to our NDA.

Any help will be appreciated. As a workaround, I'll probably do the HTML replacing on the FullText property by myself, after getting the results.

Thanks.

Mauro

@RyanTuckNZ
Copy link

Hey guys, wondering if there has been any movement on this issue? Encountering the same problem.

Cheers
Ryan

@Yortw
Copy link
Owner

Yortw commented Jan 31, 2020

Hi, sorry everyone. I was working on this in December and I think I have a fix, but I never published an update because I got blocked on a second issue I wanted to ship at the same time, and then I went back to my day job and haven't had time since.

I'll see if I can release an update tonight.

@RyanTuckNZ
Copy link

Hey Troy,

Thanks very much. Let us know how you get on 🙂

Cheers
Ryan

@mauroandrea
Copy link
Author

Awesome! Thank you very much Troy!

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