Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TGML help

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
I have some code that blocks html use but i would like to enable something exactly like the code block below to work on my site can anyone point me in any direction on how i would go about doing that?

Regards,
Jason

Code:
Function html(strTextHtml)
	If strTextHtml <> "" then
		strTextHtml = Replace(strTextHtml,"<script>","")
		strTextHtml = Replace(strTextHtml,"</script>","")
		strTextHtml = Replace(strTextHtml,"<a href=","{a href=")
		strTextHtml = Replace(strTextHtml,"</a>","[/a]")
		strTextHtml = Replace(strTextHtml,vbcrlf,"<br>")
		strTextHtml = Replace(strTextHtml,"<br>","[br]")
		strTextHtml = Replace(strTextHtml,"<b>","[b]")
		strTextHtml = Replace(strTextHtml,"</b>","[/b]")
		strTextHtml = Replace(strTextHtml,"<u>","[u]")
		strTextHtml = Replace(strTextHtml,"</u>","[/u]")
		strTextHtml = Replace(strTextHtml,"<i>","[i]")
		strTextHtml = Replace(strTextHtml,"</i>","[/i]")
		strTextHtml = Server.HTMLEncode(strTextHtml)
		strTextHtml = Replace(strTextHtml,"{a href=","<a href=")
		strTextHtml = Replace(strTextHtml,"[/a]","</a>")
		strTextHtml = Replace(strTextHtml,"[br]","<br>")
		strTextHtml = Replace(strTextHtml,"[b]","<b>")
		strTextHtml = Replace(strTextHtml,"[/b]","</b>")
		strTextHtml = Replace(strTextHtml,"[u]","<u>")
		strTextHtml = Replace(strTextHtml,"[/u]","</u>")
		strTextHtml = Replace(strTextHtml,"[i]","<i>")
		strTextHtml = Replace(strTextHtml,"[/i]","</i>")
		strTextHtml = Replace(strTextHtml,"&gt;",">")
		strTextHtml = Replace(strTextHtml,"&quot;",chr(34))
		html = strTextHtml
	
	End If
End Function

Jason

[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top