2020年8月31日 星期一

vb.net 解密html碼 [Decode Html / Uri / Escape]

1
2
3
4
5
6
7
8
& = &

Imports System.Web
Imports System.Net

    Private Function SpecialCharacter(strText As String) As String
        Return WebUtility.HtmlDecode(strText)
    End Function


1
2
3
4
5
%2F = /

    Private Function SpecialCharacter(strText As String) As String
        Return Uri.UnescapeDataString(strText)
    End Function


1
2
3
4
5
6
7
\u0026 = &

Imports System.Text.RegularExpressions

    Private Function SpecialCharacter(strText As String) As String
        Return Regex.Unescape(strText)
    End Function

沒有留言:

張貼留言