Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

special characters in product/categories titles unescaped when editing


Guest

Recommended Posts

Posted

I'm not too good in stripslashes/escape unescape and all that stuff :-(

 

A client of mine has a lot of products with ™ and ® in his titles, and everytime I edit and save a product or category, the real ? or ? is back in the code, not displayable in browsers.

 

Thanks!

Posted
If you want "™" to always show up as "™" you should be able to just write it as "™".

 

You don't understand my problem, let me rephrase

 

I DO want ? and ? being displayed liek symbols on the site.

for this, I need to enter ® and ™ in my admin fields. I save, everything is fine and displays corectly on the site.

 

IF I GO BACK to edit a product or a category in the admin side, I see ? and ? in the editabe fields instead of

® and ™ thus causing gibberish symbols to show up on the site after I save

Posted
That's strange- I tried this on my test store and didn't have a problem (ie after editing the product the symbols still show up fine).

 

when you save and then reedit, do you still see an ™ or the rendered symbol?

Posted
when you save and then reedit, do you still see an ™ or the rendered symbol?
The rendered symbol, but it still shows up ok in the browser.

 

I've been digging through categories.php for almost an hour trying to figure out where ™ becomes ? but I can't find it. Maybe the PHP itself is doing it?

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Posted
The rendered symbol, but it still shows up ok in the browser.

 

I've been digging through categories.php for almost an hour trying to figure out where ™ becomes ? but I can't find it. Maybe the PHP itself is doing it?

 

Maybe my browser has something to do with it (Safari)

 

But I know that there is a file in Oscomm that escapes/unescapes stripslashes - anyway cleans the strings before they are stored in the database. Don't know where in what file though.

Posted

For me it works fine in Firefox 1.5.0.7, IE6, and Opera 9.02.

 

I think the function you're referring to is this one from admin/includes/functions/database.php:

function tep_db_prepare_input($string) {
if (is_string($string)) {
  return trim(stripslashes($string));
} elseif (is_array($string)) {
  reset($string);
  while (list($key, $value) = each($string)) {
	$string[$key] = tep_db_prepare_input($value);
  }
  return $string;
} else {
  return $string;
}
 }

But there's nothing in there that reformats HTML code into rendered symbols.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Archived

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

×
×
  • Create New...