Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

xanburzum

[Resolvido] Remover tags HTML do texto

Recommended Posts

Remover tags HTML do texto

 

  
   
    <script LANGUAGE=VBScript>
  
    function RemoveHTML(strHTM)
    Dim strTmp, strTmp1, i, lngLen, charOne, ynWait4End
    strTmp=""
    strTmp1=CStr(strHTM)
    strTmp1 = Replace(CStr(strHTM),"<BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)' Got To try all Cases TR Tr tr tR
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<P>", vbCrLf)
    strTmp1 = Replace(strTmp,"</P>", vbCrLf)
    strTmp = Replace(strTmp1,"<P>", vbCrLf)
    strTmp1 = Replace(strTmp,"</P>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp=""
    ynWait4End = False
    lngLen = Len(strTmp1)
    For i = 1 To lngLen
    charOne=Mid(strTmp1,i,1)
    if charOne="<" Then
    ynWait4End = True
    charOne=""
    End if
    if ynWait4End = True Then
    if charOne = ">" Then
    ynWait4End = False
    End if
    charOne = ""
    End if
    strTmp = strTmp & charOne
    next
    RemoveHTML= strTmp
    End function
    //-->
    </SCRIPT>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.