 |
| 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:
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.
|