Forums
This topic is locked
messenger smilies extention with server.htmlencode
Posted 27 Feb 2002 22:01:16
1
has voted
27 Feb 2002 22:01:16 jos van de laar posted:
Hi,I have a guestbook that uses the messenger smilies extention (great extention btw).
But I want to disable the input of html tags.
If I use response.write server.htmlencode the messenger images show as < img src="smilies/beer_yum.gif" border=0 width=19 height=19 >
I know why, but is there a way that I still can use the messenger smilies extention but not that users can input html?
TIA,
zjoske
Edited by - zjoske on 27 Feb 2002 22:03:27
Replies
Replied 28 Feb 2002 10:16:04
28 Feb 2002 10:16:04 Viktor Farcic replied:
Before smilies extension code place something like:
<%
strText = Replace((Recordset.Fields.Item("Field".Value), "<", "<"
strText = Replace((Recordset.Fields.Item("Field".Value), ">", ">"
%>
After that, instead of using extension directly on recorset, use it on variable strText.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,
I have a guestbook that uses the messenger smilies extention (great extention btw).
But I want to disable the input of html tags.
If I use response.write server.htmlencode the messenger images show as < img src="smilies/beer_yum.gif" border=0 width=19 height=19 >
I know why, but is there a way that I still can use the messenger smilies extention but not that users can input html?
TIA,
zjoske
Edited by - zjoske on 27 Feb 2002 22:03:27
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager
<%
strText = Replace((Recordset.Fields.Item("Field".Value), "<", "<"
strText = Replace((Recordset.Fields.Item("Field".Value), ">", ">"
%>
After that, instead of using extension directly on recorset, use it on variable strText.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,
I have a guestbook that uses the messenger smilies extention (great extention btw).
But I want to disable the input of html tags.
If I use response.write server.htmlencode the messenger images show as < img src="smilies/beer_yum.gif" border=0 width=19 height=19 >
I know why, but is there a way that I still can use the messenger smilies extention but not that users can input html?
TIA,
zjoske
Edited by - zjoske on 27 Feb 2002 22:03:27
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager
Replied 28 Feb 2002 10:16:21
28 Feb 2002 10:16:21 jos van de laar replied:
mmm, I thought about it,
and I think it works when I first filter the “<” and “>” ,
( with Replace(strSubject,">"," & gt; " and Replace(strSubject,"<"," & lt; " )
<i>before</i> I insert the guestbook message in the database.
Or not?
and I think it works when I first filter the “<” and “>” ,
( with Replace(strSubject,">"," & gt; " and Replace(strSubject,"<"," & lt; " )
<i>before</i> I insert the guestbook message in the database.
Or not?