Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

When A Review Is Edited In Admin, An Extra Slash (\) Appears Behind Apostrophes (')!


ali_razorback

Recommended Posts

Hello!

 

I've just noticed that, after a customer submits a review, and the store owner edits it (to correct spelling etc), any apostrophes that are in the text end up with a backslash just before them. For instance, I'm very happy... turns into I\'m very happy...

 

There isn't this problem when a review is initially written, just when it's edited in admininstration!

 

I'm certain that I haven't modified the reviews section, so I'd assume that this is a standard problem with osCommerce? Does anyone else have this problem, and does anyone know a fix, as it looks very unprofessional!

 

Fingers crossed :)

 

 

Alice

Link to comment
Share on other sites

  • 1 month later...

Hi,

did anyone find the answer to this? It's been bothering me for ages and should be fixed. searched and searched and searched....

 

 

Thanks

Tiger

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

I had this problem some time ago when I was working with databases. There is a command you can use to get rid of the slashes after apostrophes, which I believe is something similar to :

 

stripslashes($row[1])

 

where ($row[1]) is the text or value to be stripped of slashes. I know it works in SQLite, but you're probably using something different... Hope that helps

Link to comment
Share on other sites

I had this problem some time ago when I was working with databases. There is a command you can use to get rid of the slashes after apostrophes, which I believe is something similar to :

 

stripslashes($row[1])

 

where ($row[1]) is the text or value to be stripped of slashes. I know it works in SQLite, but you're probably using something different... Hope that helps

 

Thanks for replying. I don't know anything about SQlite I'm afraid, I'm using the Admin panel, same as the original poster:

 

I've just noticed that, after a customer submits a review, and the store owner edits it (to correct spelling etc), any apostrophes that are in the text end up with a backslash just before them. For instance, I'm very happy... turns into I\'m very happy...

 

There isn't this problem when a review is initially written, just when it's edited in admininstration!

 

I'm certain that I haven't modified the reviews section, so I'd assume that this is a standard problem with osCommerce? Does anyone else have this problem, and does anyone know a fix, as it looks very unprofessional!

 

 

Any help welcomed, I'm sure it's not just me who has this problem - it's a OSc BUG.

Tiger

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

Thanks for replying. I don't know anything about SQlite I'm afraid, I'm using the Admin panel, same as the original poster:

Any help welcomed, I'm sure it's not just me who has this problem - it's a OSc BUG.

Tiger

yes, this look like an osC problem.

 

Open your catalog\admin\reviews.php locate this code:

/* Re-Post all POST'ed variables */
  reset($HTTP_POST_VARS);
  while(list($key, $value) = each($HTTP_POST_VARS)) echo tep_draw_hidden_field($key, $value);

 

Replace it with:

/* Re-Post all POST'ed variables */
  reset($HTTP_POST_VARS);
  while(list($key, $value) = each($HTTP_POST_VARS)) echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));

Link to comment
Share on other sites

yes, this look like an osC problem.

 

Open your catalog\admin\reviews.php locate this code:

/* Re-Post all POST'ed variables */
  reset($HTTP_POST_VARS);
  while(list($key, $value) = each($HTTP_POST_VARS)) echo tep_draw_hidden_field($key, $value);

 

Replace it with:

/* Re-Post all POST'ed variables */
  reset($HTTP_POST_VARS);
  while(list($key, $value) = each($HTTP_POST_VARS)) echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));

 

Yet again, Enigma saves the day - your code worked perfectly.

 

Thanks so much

Tigergirl

 

:thumbsup:

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

YAY!

 

Thank you so much that is awesome, it has been peeing me off for so long!!!!!

 

 

Out of interest, what do people think about us correcting spellings/punctuation/grammar in reviews? After asking for a solution to this bug, I actually noticed (using the who's online enhancement) that someone had accessed my website because of a spelling mistake in a review - they had spelt 'pickle' incorrectly as 'pickel' and someone had written this in a review, which in turn led to my website appearing in the search results. What do other people think about this?!

 

Thanks ever so much once again for the fixedness! :)

Link to comment
Share on other sites

YAY!

 

Thank you so much that is awesome, it has been peeing me off for so long!!!!!

Out of interest, what do people think about us correcting spellings/punctuation/grammar in reviews? After asking for a solution to this bug, I actually noticed (using the who's online enhancement) that someone had accessed my website because of a spelling mistake in a review - they had spelt 'pickle' incorrectly as 'pickel' and someone had written this in a review, which in turn led to my website appearing in the search results. What do other people think about this?!

 

Thanks ever so much once again for the fixedness! :)

 

Hi Alice,

My sister had written some reviews, she jokingly kicked up a stink when I told her I'd added the keywords of the products because that's what google likes and indexes. I suppose little changes wouldn't affect anyone - they may not even notice or remember what they'd written. But search engines do find the mispelled words, and people do search using mispelled words - maybe it's good to have them as you'll get a high placement if you're the only person using that mispelt word. I came at the top of the list when I searched for eco-freindly something or other - to my horror I found I had mispelt it on my home page keywords!!

 

Don't ever underestimate the power of reviews and site indexing. I've seen reviews coming above my products in searches!

 

Tiger

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

Glad to hear that someone else thinks it's a good idea!

 

That's crazy that your reviews were appearing higher than some of your items. Search engines like updated pages don't they, I guess reviews are updated more frequently than product pages so perhaps that's why.

 

Perhaps I'll go through my reviews and adding in little spelling mistakes instead, although half the people writing them appear to be dyslexic anyway haha!

 

The "Who's Online" enhancement contribution is just so useful for these sort of things, finding out what people have searched for etc to find you. Now I'm slightly addicted to it and am checking it every 10 minutes haha :lol:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...