OSDN Git Service

非常に長いSourceによって表示が壊れる現象に対処
authorsyo68k <syo68k@users.sourceforge.jp>
Mon, 30 Aug 2010 15:14:45 +0000 (15:14 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:15:05 +0000 (23:15 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@784 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/ShowUserInfo.vb
Tween/Twitter.vb

index 3e8f28e..a930261 100644 (file)
@@ -102,6 +102,9 @@ Public Class ShowUserInfo
                     _info.PostCreatedAt = DateTime.ParseExact(xdoc.SelectSingleNode("/status/created_at").InnerText, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None)
                     _info.PostSource = xdoc.SelectSingleNode("/status/source").InnerText
                 End If
+                If Not _info.PostSource.Contains("</a>") Then
+                    _info.PostSource += "</a>"
+                End If
             Catch ex As Exception
                 _info.RecentPost = Nothing
                 _info.PostCreatedAt = Nothing
index cd5e26a..fc43a63 100644 (file)
@@ -634,6 +634,9 @@ Public Class Twitter
             'Source整形
             If post.Source.StartsWith("<") Then
                 'Dim rgS As New Regex(">(?<source>.+)<")
+                If Not post.Source.Contains("</a>") Then
+                    post.Source += "</a>"
+                End If
                 Dim mS As Match = Regex.Match(post.Source, ">(?<source>.+)<")
                 If mS.Success Then
                     post.Source = HttpUtility.HtmlDecode(mS.Result("${source}"))
@@ -1530,6 +1533,9 @@ Public Class Twitter
                 'Source整形
                 If post.Source.StartsWith("<") Then
                     'Dim rgS As New Regex(">(?<source>.+)<")
+                    If Not post.Source.Contains("</a>") Then
+                        post.Source += "</a>"
+                    End If
                     Dim mS As Match = Regex.Match(post.Source, ">(?<source>.+)<")
                     If mS.Success Then
                         post.Source = HttpUtility.HtmlDecode(mS.Result("${source}"))
@@ -1669,6 +1675,9 @@ Public Class Twitter
                 'Source整形
                 If post.Source.StartsWith("<") Then
                     'Dim rgS As New Regex(">(?<source>.+)<")
+                    If Not post.Source.Contains("</a>") Then
+                        post.Source += "</a>"
+                    End If
                     Dim mS As Match = Regex.Match(post.Source, ">(?<source>.+)<")
                     If mS.Success Then
                         post.Source = HttpUtility.HtmlDecode(mS.Result("${source}"))
@@ -1946,6 +1955,9 @@ Public Class Twitter
                 post.Data = post.Data.Replace("<3", "♡")
                 'Source整形
                 If post.Source.StartsWith("<") Then
+                    If Not post.Source.Contains("</a>") Then
+                        post.Source += "</a>"
+                    End If
                     Dim mS As Match = Regex.Match(post.Source, ">(?<source>.+)<")
                     If mS.Success Then
                         post.Source = HttpUtility.HtmlDecode(mS.Result("${source}"))