Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

apostrophe problem


warrenthewindmill

Recommended Posts

We are testing our site and have tried to purchase a product with an Irish O' customer name.

 

The purchase completes OK but when the name is displayed the escape character is shown b4 the apostrophe.

 

Also a similar problem appears when trying to purchase gift vouchers. I have disabled whos online in application_top.php as suggested but it does not solve the problem.

 

Surely OSCommerce does not have such a basic bug (maybe not so basic - my tester says he didn't get electric bills for months because of his apostrophe and none of his bank a/c's show the ' )

 

Would anyone like to give me the guide to the dreaded ' ?

 

I had previously got an error when using a ' in a product name. My workround was to remove it, but the problem seems more widespread

 

Thanks

 

WTW

Link to comment
Share on other sites

Warren,

 

Try a search on the forum using *stripslashes* (with the asterisks) for your search string. I believe that will help you find your answer.

Link to comment
Share on other sites

  • 3 weeks later...

I've been plagued by this problem, as O'Neil is my surname.

 

I just fixed it in catalog/contact_us.php in a simple, slightly different way than posted on Kim's link above.

 

I changed

 

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $HTTP_POST_VARS['enquiry'], $HTTP_POST_VARS['name'],

 

to

 

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, stripslashes($HTTP_POST_VARS['enquiry']), stripslashes($HTTP_POST_VARS['name']),

 

---

 

What I did was put a separate stripslashes() around both the $http_post_vars for the enquiry and the customer's name so if either contains apostrophes it won't put the escape slash in front of the apostrophe.

 

Now I just have to figure out how to do the same for the SPG Shipping/Manual Entry contribution...

 

--Kevin Ostripslash'Neil :wink:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...