Hej! Detta är inte bra... html går att använda trots att jag trodde jag "server.htmlencode"-at bort det..
min kod ser ut så här:
<%
textish = RecSet("mess")
'Text including codes to be converted
strText = textish
'HTMLencode to get rid of tags
strText = [b]Server.HTMLEncode(strText)[/b]
strText = Replace(textish, ":)", "<img src='smiley.gif'>")
textish = Replace(textish, ":-)", "<img src='smiley.gif'>")
textish = Replace(textish, "=)", "<img src='smiley.gif'>")
textish = Replace(textish, ";)", "<img src='skamta.gif'>")
textish = Replace(textish, ";-)", "<img src='skamta.gif'>")
textish = Replace(textish, ":D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":=D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":-D", "<img src='stortsmajl.gif'>")
textish = Replace(textish, ":(", "<img src='sad.gif'>")
textish = Replace(textish, "=(", "<img src='sad.gif'>")
textish = Replace(textish, ":-(", "<img src='sad.gif'>")
textish = Replace(textish, ":p", "<img src='tongue.gif'>")
textish = Replace(textish, ":-p", "<img src='tongue.gif'>")
textish = Replace(textish, ":P", "<img src='tongue.gif'>")
textish = Replace(textish, "=P", "<img src='tongue.gif'>")
textish = Replace(textish, ":|", "<img src='duh.gif'>")
textish = Replace(textish, ":-|", "<img src='duh.gif'>")
textish = Replace(textish, ":O", "<img src='wow.gif'>")
textish = Replace(textish, ":-O", "<img src='wow.gif'>")
textish = Replace(textish, ">(", "<img src='hmm.gif'>")
textish = Replace(textish, ":???:", "<img src='ehh.gif'>")
textish = Replace(textish, ":rolleyes:", "<img src='rolleyes.gif'>")
textish = Replace(textish, ":julklapp:", "<img src='julklapp.gif'>")
textish = Replace(textish, vbcrlf, "<br>")
strText = textish
'Creates new regexp
Set objRegExp = New regexp
'Do more than once
objRegExp.Global = true
'Ignore whether upper or lowercase
objRegExp.IgnoreCase = true
'Replace colors
'Pattern to look for
objRegExp.Pattern = "\[(blue)\]"
'Execute the replacement
strText = objRegExp.Replace(strText,"<font color=""#003399"">")
'Pattern to look for
objRegExp.Pattern = "\[(red)\]"
'Execute the replacement
strText = objRegExp.Replace(strText,"<font color=""#CC0000"">")
'Pattern to look for
objRegExp.Pattern = "\<(b)\>"
'Execute the replacement
strText = objRegExp.Replace(strText,"<b>")
'Pattern to look for
objRegExp.Pattern = "\<(/b)\>"
'Execute the replacement
strText = objRegExp.Replace(strText,"</b>")
'Pattern to look for
objRegExp.Pattern = "\[(white)\]"
'Execute the replacement
strText = objRegExp.Replace(strText,"<font color=""#ffffff"">")
'Pattern to look for
objRegExp.Pattern = "\[(yellow)\]"
'Execute the replacement
strText = objRegExp.Replace(strText,"<font color=""#F8E187"">")
'Pattern to look for
objRegExp.Pattern = "\[(green)\]"
'Execute the replacement
strText = objRegExp.Replace(strText,"<font color=""#339933"">")
'Replace all ending tags with </font>
objRegExp.Pattern = "(\[\/blue\]|\[\/red\]|\[\/green\]|\[\/white\]|\[\/yellow\]|\[\/color\])"
strText = objRegExp.Replace(strText,"</font>")
response.write strText
%>
och trots detta (det felstilade) så fungerar html utmärkt och folk kan härja som dom vill :(.. Snälla hjälp mig!
mvh /Max
------------------
dom sa att en milion apor med skirvmaskiner skulle återskapa Shakespeares samlade verk om de bara fick tid... internet bevisade motsatsen