This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Kevin Stock (KStock@corp.auspex.com)
Wed, 04 Nov 1998 17:02:21 +0100
* Messages sorted by: [ date ][ thread ][ subject ][ author ]
* Next message: Brian C. Shensky: "RE: Warning: influx of
Detroit-based DBI users..."
* Previous message: Tom May: "Re: $sth->rows (I'm pretty sure I know
this one) and another if someo ne has time.."
* Maybe in reply to: ILKER KAVAS: "html problem"
* Next in thread: Randal Schwartz: "Re: html problem"
*** From dbi-users -- To unsubscribe, see the end of this message. ***
Fall Birahim wrote:
> > Kevin Stock [SMTP:KStock@corp.auspex.com] wrote:
> > > My project is about questionairefrom www by using
> > > mysql and dbi. I have difficulty in screening the
> > > questions because these includes <,>,-,=,\,/and so
> > > on. I thought that I can store my data in html
> > > format so when I print them from a perl program
> > > they can be displayed but since the questions will
> > > be entred from www. so I need a filter that
> > > converts a text to html ...(little bit long a)
> > >
> > > Is there anything that can help me?
> >
> > This isn't really a dbi question, but...
> >
> > s/&/ /g <--- this one must be first
> > s/</</g
> > etc
> Shoudn't it be
> s/&/&/g <--- this one must be first
>
> instead of
> s/&/ /g <--- this one must be first
>
> & is the hml scape for ampersand!
Correct, sorry. Just a typo to see if you're all awake :-)
===
Randal Schwartz (merlyn@stonehenge.com)
05 Nov 1998 07:50:57 -0700
* Messages sorted by: [ date ][ thread ][ subject ][
author ]
* Next message: Michael Peppler: "Newbie Question -
Retrieving Text
Data Type"
* Previous message: Steven Barber: "Progress DBD?"
* In reply to: Kevin Stock: "Re: html problem"
*** From dbi-users -- To unsubscribe, see the end of this
message. ***
>>>>> "Kevin" == Kevin Stock <KStock@corp.auspex.com> writes:
>> & is the hml scape for ampersand!
Kevin> Correct, sorry. Just a typo to see if you're all awake :-)
And the right way to do it so that you don't do the wrong
things, and also handle all the high-bit chars correctly,
is this:
use HTML::Entities;
$escaped = encode_entities($raw);
:-)
===