Recent Articles

ColdFusion Brands With Adobe, Shares Data with Perl
ColdFusion's latest version emerges for the first time under the Adobe brand name; it's changed a lot since its early dot-com days of doing database calls for HTML. The arrival of the public beta of Adobe ColdFusion 8 finds...

How to Make your URLs SEO Friendly
It is a well-known fact nowadays that without SEO a Web site stands many chances of not being indexed by search spiders, therefore risking not being ranked high...

Apache, PHP, Suhosin Security Patch and mod_perl
For many reasons many people want to compile their own source code to build apache and php / mod_perl these days. We will discuss the steps required in doing just that. But unlike most others we will throw in some...

Review: The Apache Module Book
Aaargh.. C code. I never thought I'd say that, but there it is. I must be getting old. Oh well, at least I can still read it. And this book did open my eyes to the inner workings of Apache - I had really never thought much about any...

Perl, CGI And SSI Advice
One of the goals of our WebProWorld forum is for people to help each other with problems that may be having whether it be in marketing, eCommerce, or coding.


08.24.07


Stripping Out Bad Characters Generated By A Perl Shopping Cart

By Chris Crum

There is an interesting thread in the WebProWorld forum that solves a problem a member was having trying to strip bad characters from a block of text generated by his perl shopping cart.

The member's initial post reads:

I'm trying to strip our bad characters from a block of text with javascript. This seems to work sometimes but not others and I think it has to do with me not stripping out all the bad characters.

Of course, I could be completely wrong.

Here is my code so far, which truncates the resulting text:



Try a Better Way Today. Try WebEx MeetMeNow

The !---TEXT--- is a text file created by our shopping cart and holds product information. I thought I was only returning A-Z and 0-9 with my regex but I'm not sure if I'm doing it correctly.

Now, I said it work sometimes and not with others. The major difference I see with the ones that work and the ones that don't is that there are quotes "" in the text or there may be some html in the text.

A. Would this cause the javascript to break?

B. If so, what can I do?

C. Am I completely wrong about why it's not working?

D. Just give up this javascript stuff because I don't know what the hell I'm doing.

Watch the mystery unravel by reading the rest of the thread.

About the Author:
Chris is a staff writer for WebProNews. Visit WebProNews for the latest ebusiness news.


About PerlProNews
PerlProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Perl environments. News and Advice for Perl Professionals

PerlProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
PerlProNews.com SQLProNews.com
SysAdminNews DevWebPro.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com


-- PerlProNews
is an iEntry, Inc. publication --
iEntry, 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



Database Forum News and Advice for Perl Professionals PerlProNews News Archives About Us Feedback PerlProNews.com About Article Archive News Downloads WebProWorld Forums iEntry Advertise Contact Jayde