Hej, Använd HTMLEncode: Ok, arabiska tecken har jag tyvärr inte så stor erfarenhet av... :) Då har jag nog ingen bra idé tyvärr. Testa:Tillåt ej html
Jag vill lägga till en kodsnutt så inte html tillåts,
så ser min kod ut:
<code>
<%
Comment = Rec2("comment")
Do Until Comment = ""
Word = ""
Do Until Right(Word, 1) = " " Or Right(Word, 2) = vbCrLf Or Comment = ""
Word = Word & Left(Comment, 1)
Comment = Mid(Comment, 2)
Loop
Word2 = ""
If Len(Word) > 70 Then
Do Until Word = ""
Word2 = Word2 & Left(Word, 70) & "<br>"
Word = Mid(Word, 71)
Loop
Word = Word2
End If
Word = Replace(Word, vbCrLf, "<br>")
Response.Write Word
Loop
%>
</code>Sv: Tillåt ej html
Word = Replace(Server.HTMLEncode(Word), vbCrLf, "<br>")
/JohanSv: Tillåt ej html
/JohanSv: Tillåt ej html
<code>
<%
Comment = Rec2("comment")
Do Until Comment = ""
Word = ""
Do Until Right(Word, 1) = " " Or Right(Word, 2) = vbCrLf Or Comment = ""
Word = Word & Left(Comment, 1)
Comment = Mid(Comment, 2)
Loop
Word2 = ""
If Len(Word) > 70 Then
Do Until Word = ""
Word2 = Word2 & Left(Word, 70) & "<br>"
Word = Mid(Word, 71)
Loop
Word = Word2
End If
Word = Replace(Word, "<", "<")
Word = Replace(Word, ">", ">")
Word = Replace(Word, vbCrLf, "<br>")
Response.Write Word
Loop
%>
</code>
/Thomas