|
 |
asp_web_howto thread: chat room question too
Message #1 by "Jimmy Ho" <jimmyyl@h...> on Wed, 12 Dec 2001 17:22:09 +0800
|
|
I have created a simple chat room that just put whatever the user type on
the display.
I cannot stop the users from typing html code.
How can I stop them from typing html code without deleting any character?
e.g
If they type <p>abc</p>,
I wish the display frame will show <p>abc</p> exactly, but without the
effect of openning a new paragraph.
Thanx
Message #2 by "Jason Salas" <jason@k...> on Wed, 12 Dec 2001 19:04:29 +1000
|
|
Try surrounding the text included within your TEXTAREA box in either <XMP>
</XMP> or <PRE> </PRE> tags. This will decode your HTML and show all markup
with the content.
HTH,
Jason
----- Original Message -----
From: "Jimmy Ho" <jimmyyl@h...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, December 12, 2001 7:22 PM
Subject: [asp_web_howto] chat room question too
> I have created a simple chat room that just put whatever the user type on
> the display.
> I cannot stop the users from typing html code.
> How can I stop them from typing html code without deleting any character?
> e.g
> If they type <p>abc</p>,
> I wish the display frame will show <p>abc</p> exactly, but without the
> effect of openning a new paragraph.
> Thanx
>
>
>
$subst('Email.Unsub').
>
Message #3 by "Jimmy Ho" <jimmyyl@h...> on Wed, 12 Dec 2001 17:48:05 +0800
|
|
Will it work if I change all the input text to be unicode?
And how to do it?
Thanx
----- Original Message -----
From: "Jason Salas" <jason@k...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, December 12, 2001 5:04 PM
Subject: [asp_web_howto] Re: chat room question too
> Try surrounding the text included within your TEXTAREA box in either <XMP>
> </XMP> or <PRE> </PRE> tags. This will decode your HTML and show all
markup
> with the content.
>
> HTH,
> Jason
>
>
> ----- Original Message -----
> From: "Jimmy Ho" <jimmyyl@h...>
> To: "ASP Web HowTo" <asp_web_howto@p...>
> Sent: Wednesday, December 12, 2001 7:22 PM
> Subject: [asp_web_howto] chat room question too
>
>
> > I have created a simple chat room that just put whatever the user type
on
> > the display.
> > I cannot stop the users from typing html code.
> > How can I stop them from typing html code without deleting any
character?
> > e.g
> > If they type <p>abc</p>,
> > I wish the display frame will show <p>abc</p> exactly, but without the
> > effect of openning a new paragraph.
> > Thanx
> >
> >
> >
> $subst('Email.Unsub').
> >
>
>
$subst('Email.Unsub').
Message #4 by "Jason Salas" <jason@k...> on Wed, 12 Dec 2001 20:46:06 +1000
|
|
Probably not...that might just be the format the text is in itself. By its
nature, data entered in a Web form is in ASCII, so to get it in Unicode, you
could do something in XML...but it would be more work in the end.
Try it out...take this HTML source and view it between <XMP></XMP> tags:
<html><body>
<xmp>
<html><body>
<h1><font face="Tahoma">This is my name in <b>bold</b>!</font></h1>
<br><br>
<h3><font face="Verdana">Hello there!</font></h3>
</body</html>
</xmp>
</body></html>
Jason
----- Original Message -----
From: "Jimmy Ho" <jimmyyl@h...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, December 12, 2001 7:48 PM
Subject: [asp_web_howto] Re: chat room question too
> Will it work if I change all the input text to be unicode?
> And how to do it?
> Thanx
>
> ----- Original Message -----
> From: "Jason Salas" <jason@k...>
> To: "ASP Web HowTo" <asp_web_howto@p...>
> Sent: Wednesday, December 12, 2001 5:04 PM
> Subject: [asp_web_howto] Re: chat room question too
>
>
> > Try surrounding the text included within your TEXTAREA box in either
<XMP>
> > </XMP> or <PRE> </PRE> tags. This will decode your HTML and show all
> markup
> > with the content.
> >
> > HTH,
> > Jason
Message #5 by Kyle Burns <kburns@c...> on Mon, 17 Dec 2001 09:40:57 -0500
|
|
Use the HTMLEncode() method on the string that they input.
=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...
>> -----Original Message-----
>> From: Jimmy Ho [mailto:jimmyyl@h...]
>> Sent: Wednesday, December 12, 2001 4:22 AM
>> To: ASP Web HowTo
>> Subject: [asp_web_howto] chat room question too
>>
>>
>> I have created a simple chat room that just put whatever the
>> user type on
>> the display.
>> I cannot stop the users from typing html code.
>> How can I stop them from typing html code without deleting
>> any character?
>> e.g
>> If they type <p>abc</p>,
>> I wish the display frame will show <p>abc</p> exactly, but
>> without the
>> effect of openning a new paragraph.
>> Thanx
>>
>>
>>
>> $subst('Email.Unsub').
>>
|
|
 |