Permalink
Browse files

Hotfix conversión de texto desde api

  • Loading branch information...
MarioFinale committed Feb 16, 2018
1 parent b552889 commit a9034142765aac496a03c83e4f5411230c723a1c
Showing with 8 additions and 5 deletions.
  1. +0 −4 GrillitusArchive.vb
  2. +8 −1 TextFunctions.vb
@@ -287,10 +287,7 @@ Class GrillitusArchive
destination = ArchiveCfg(0).Replace("AAAA", Threadyear).Replace("MM", ThreadMonth) _
.Replace("DD", ThreadDay).Replace("SEM", Threadhyear.ToString)
End If
Archives.Add(New Tuple(Of String, String)(destination, t))
ArchivedThreads += 1
End If
@@ -314,7 +311,6 @@ Class GrillitusArchive
Archives.Add(New Tuple(Of String, String)(destination, t))
ArchivedThreads += 1
End If
End If
@@ -171,7 +171,14 @@ Module TextFunctions
''' <param name="text"></param>
''' <returns></returns>
Function NormalizeUnicodetext(ByVal text As String) As String
Return Regex.Replace(text, "\\u([\dA-Fa-f]{4})", Function(v) ChrW(Convert.ToInt32(v.Groups(1).Value, 16))).Replace("\n", Environment.NewLine).Replace("\""", """").Replace("\\", "\").Replace("\t" & Environment.NewLine, "")
Dim temptext As String = Regex.Replace(text, "\\u([\dA-Fa-f]{4})", Function(v) ChrW(Convert.ToInt32(v.Groups(1).Value, 16)))
temptext = Regex.Replace(temptext, "(?<!\\)\\n", Environment.NewLine)
temptext = Regex.Replace(temptext, "(?<!\\)\\t", Environment.NewLine)
temptext = temptext.Replace("\""", """")
temptext = temptext.Replace("\\", "\")
temptext = temptext.Replace("\\n", "\n")
temptext = temptext.Replace("\\t", "\t")
Return temptext
End Function
''' <summary>
''' Codifica una cadena de texto en URLENCODE.

0 comments on commit a903414

Please sign in to comment.