dev
Revision | 4222a28cbcd4ca2a4c3a25b5590d102595cf02c3 (tree) |
---|---|
Time | 2012-02-18 23:12:32 |
Author | syo68k <syo68k@user...> |
Commiter | Kimura Youichi |
バージョン上げ
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@333 e39ad16e-3079-482e-bb30-4b4d378143b6
@@ -55,5 +55,5 @@ Imports System.Runtime.InteropServices | ||
55 | 55 | ' <Assembly: AssemblyVersion("1.0.*")> |
56 | 56 | |
57 | 57 | <Assembly: AssemblyVersion("0.1.0.0")> |
58 | -<Assembly: AssemblyFileVersion("0.8.9.3")> | |
58 | +<Assembly: AssemblyFileVersion("0.8.9.4")> | |
59 | 59 |
@@ -284,15 +284,9 @@ Public Class Twitter | ||
284 | 284 | Private Function SanitizeHtml(ByVal orgdata As String) As String |
285 | 285 | Dim retdata As String = orgdata |
286 | 286 | |
287 | - ' <script ~ </script> | |
288 | - 'Dim rx As Regex = New Regex( _ | |
289 | - ' "<(script|object|applet|image|frameset|fieldset|legend|style).*" & _ | |
290 | - ' "</(script|object|applet|image|frameset|fieldset|legend|style)>", RegexOptions.IgnoreCase) | |
291 | 287 | retdata = Regex.Replace(retdata, "<(script|object|applet|image|frameset|fieldset|legend|style).*" & _ |
292 | 288 | "</(script|object|applet|image|frameset|fieldset|legend|style)>", "", RegexOptions.IgnoreCase) |
293 | 289 | |
294 | - ' <frame src="..."> | |
295 | - 'rx = New Regex("<(frame|link|iframe|img)>", RegexOptions.IgnoreCase) | |
296 | 290 | retdata = Regex.Replace(retdata, "<(frame|link|iframe|img)>", "", RegexOptions.IgnoreCase) |
297 | 291 | |
298 | 292 | Return retdata |
@@ -300,7 +294,6 @@ Public Class Twitter | ||
300 | 294 | |
301 | 295 | Private Function AdjustHtml(ByVal orgData As String) As String |
302 | 296 | Dim retStr As String = orgData |
303 | - 'Dim hash As New Regex("<a [^>]+>[#|#](?<1>[a-zA-Z0-9_]+)</a>") | |
304 | 297 | Dim m As Match = Regex.Match(retStr, "<a [^>]+>[#|#](?<1>[a-zA-Z0-9_]+)</a>") |
305 | 298 | While m.Success |
306 | 299 | SyncLock LockObj |
@@ -317,20 +310,6 @@ Public Class Twitter | ||
317 | 310 | Do |
318 | 311 | ret = EscapeSpace(retStr) |
319 | 312 | Loop While Not ret |
320 | - 'Dim isTag As Boolean = False | |
321 | - 'For i As Integer = 0 To retStr.Length - 1 | |
322 | - ' If retStr(i) = "<"c Then | |
323 | - ' isTag = True | |
324 | - ' End If | |
325 | - ' If retStr(i) = ">"c Then | |
326 | - ' isTag = False | |
327 | - ' End If | |
328 | - | |
329 | - ' If (Not isTag) AndAlso (retStr(i) = " "c) Then | |
330 | - ' retStr = retStr.Remove(i, 1) | |
331 | - ' retStr = retStr.Insert(i, " ") | |
332 | - ' End If | |
333 | - 'Next | |
334 | 313 | |
335 | 314 | Return SanitizeHtml(retStr) |
336 | 315 | End Function |
@@ -440,40 +419,6 @@ Public Class Twitter | ||
440 | 419 | End Try |
441 | 420 | End Sub |
442 | 421 | |
443 | - 'Private Function GetAuthKey(ByVal resMsg As String) As Integer | |
444 | - ' Dim pos1 As Integer | |
445 | - ' Dim pos2 As Integer | |
446 | - | |
447 | - ' pos1 = resMsg.IndexOf(_getAuthKey, StringComparison.Ordinal) | |
448 | - ' If pos1 < 0 Then | |
449 | - ' 'データ不正? | |
450 | - ' Return -7 | |
451 | - ' End If | |
452 | - ' pos2 = resMsg.IndexOf(_getAuthKeyTo, pos1 + _getAuthKey.Length, StringComparison.Ordinal) | |
453 | - ' If pos2 > -1 Then | |
454 | - ' _authKey = resMsg.Substring(pos1 + _getAuthKey.Length, pos2 - pos1 - _getAuthKey.Length) | |
455 | - ' Else | |
456 | - ' Return -7 | |
457 | - ' End If | |
458 | - | |
459 | - ' Return 0 | |
460 | - 'End Function | |
461 | - | |
462 | - 'Private Function GetAuthKeyDM(ByVal resMsg As String) As Integer | |
463 | - ' Dim pos1 As Integer | |
464 | - ' Dim pos2 As Integer | |
465 | - | |
466 | - ' pos1 = resMsg.IndexOf(_getAuthKey, StringComparison.Ordinal) | |
467 | - ' If pos1 < 0 Then | |
468 | - ' 'データ不正? | |
469 | - ' Return -7 | |
470 | - ' End If | |
471 | - ' pos2 = resMsg.IndexOf("""", pos1 + _getAuthKey.Length, StringComparison.Ordinal) | |
472 | - ' _authKeyDM = resMsg.Substring(pos1 + _getAuthKey.Length, pos2 - pos1 - _getAuthKey.Length) | |
473 | - | |
474 | - ' Return 0 | |
475 | - 'End Function | |
476 | - | |
477 | 422 | Private Structure PostInfo |
478 | 423 | Public CreatedAt As String |
479 | 424 | Public Id As String |
@@ -1769,9 +1714,6 @@ Public Class Twitter | ||
1769 | 1714 | End Try |
1770 | 1715 | Next |
1771 | 1716 | |
1772 | - '_remainCountApi = sck.RemainCountApi | |
1773 | - 'If _ApiMethod = MySocket.REQ_TYPE.ReqGetAPI Then _remainCountApi = sck.RemainCountApi | |
1774 | - | |
1775 | 1717 | Return "" |
1776 | 1718 | End Function |
1777 | 1719 |
@@ -2108,15 +2050,6 @@ Public Class Twitter | ||
2108 | 2050 | 'Dim retStr As String = HttpUtility.HtmlDecode(Text) |
2109 | 2051 | Dim retStr As String = "" |
2110 | 2052 | 'uriの正規表現 |
2111 | - 'Dim rgUrl As Regex = New Regex("(?<![0-9A-Za-z=])(?:https?|shttp|ftps?)://(?:(?:[-_.!~*'()a-zA-Z0-9;:&=+$,]|%[0-9A-Fa-f" + _ | |
2112 | - ' "][0-9A-Fa-f])*@)?(?:(?:[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?\.)" + _ | |
2113 | - ' "*[a-zA-Z](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?\.?|[0-9]+\.[0-9]+\.[0-9]+\." + _ | |
2114 | - ' "[0-9]+)(?::[0-9]*)?(?:/(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f]" + _ | |
2115 | - ' "[0-9A-Fa-f])*(?:;(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-" + _ | |
2116 | - ' "Fa-f])*)*(?:/(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f" + _ | |
2117 | - ' "])*(?:;(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])*)*)" + _ | |
2118 | - ' "*)?(?:\?(?:[-_.!~*'()a-zA-Z0-9;/?:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])" + _ | |
2119 | - ' "*)?(?:#(?:[-_.!~*'()a-zA-Z0-9;/?:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])*)?") | |
2120 | 2053 | Const rgUrl As String = "(?<before>(?:[^\""':!=]|^|\:))" + _ |
2121 | 2054 | "(?<url>(?<protocol>https?://|www\.)" + _ |
2122 | 2055 | "(?<domain>(?:[\.-]|[^\p{P}\s])+\.[a-z]{2,}(?::[0-9]+)?)" + _ |