svnno****@sourc*****
svnno****@sourc*****
2011年 10月 12日 (水) 09:42:31 JST
Revision: 1626 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1626 Author: kiri_feather Date: 2011-10-12 09:42:31 +0900 (Wed, 12 Oct 2011) Log Message: ----------- CreateHtmlAnchorでの例外報告を受けて、Twitterが返してくるentitiesが怪しいと予想を付けて対処してみた Modified Paths: -------------- trunk/Tween/Twitter.vb Property Changed: ---------------- trunk/Tween/ -------------- next part -------------- Property changes on: trunk/Tween ___________________________________________________________________ Modified: svn:ignore - Tween.vbproj.user bin obj Service References + Tween.vbproj.user bin obj Service References *.suo Modified: trunk/Tween/Twitter.vb =================================================================== --- trunk/Tween/Twitter.vb 2011-10-10 15:55:26 UTC (rev 1625) +++ trunk/Tween/Twitter.vb 2011-10-12 00:42:31 UTC (rev 1626) @@ -3170,6 +3170,7 @@ 'URL If entities.Urls IsNot Nothing Then For Each ent In entities.Urls + Array.Sort(ent.Indices) If String.IsNullOrEmpty(ent.DisplayUrl) Then etInfo.Add(ent.Indices(0), New EntityInfo With {.StartIndex = ent.Indices(0), @@ -3190,6 +3191,7 @@ End If If entities.Hashtags IsNot Nothing Then For Each ent In entities.Hashtags + Array.Sort(ent.Indices) Dim hash As String = Text.Substring(ent.Indices(0), ent.Indices(1) - ent.Indices(0)) etInfo.Add(ent.Indices(0), New EntityInfo With {.StartIndex = ent.Indices(0), @@ -3203,6 +3205,7 @@ End If If entities.UserMentions IsNot Nothing Then For Each ent In entities.UserMentions + Array.Sort(ent.Indices) Dim screenName As String = Text.Substring(ent.Indices(0) + 1, ent.Indices(1) - ent.Indices(0) - 1) etInfo.Add(ent.Indices(0) + 1, New EntityInfo With {.StartIndex = ent.Indices(0) + 1, @@ -3214,6 +3217,7 @@ End If If entities.Media IsNot Nothing Then For Each ent In entities.Media + Array.Sort(ent.Indices) If ent.Type = "photo" Then etInfo.Add(ent.Indices(0), New EntityInfo With {.StartIndex = ent.Indices(0),