Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Carets (<>) replaced with Underscores (_) in Admin


travistubbs

Recommended Posts

This is an issue that I can't seem to pinpoint and just looking for guideance as to where I could possibly look in the code for the solution.

 

For some reason, when a description is being displayed in Admin section of osCommerce (for example, when displaying descriptions of a module), any carets (<>) in the description are replaced by an underscore (_). This means that any HTML used does not render properly.

 

I've had this problem for a while but it really didn't bother me much. Now, it's starting to bother me. :) As I am unsure what started this, I really cannot explain if it was an add-on or something that started this issue. So, I'm looking to see if anyone has any possible general thoughts on where I could possibly start looking in the code to determine what the cause could be.

 

I welcome any thoughts and suggestions.

Link to comment
Share on other sites

Could be the module your using is cleaning the tags, you could a wysiwyg to input html like FCKeditor for Product Descriptions http://addons.oscommerce.com/info/2900

its an easy install.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I had that problem awhile back and never did find a fix. The front end was not bothered by it so I just started rebuilding from scratch. I know its not what you want to hear but I never got a responce to my post at all. I even used winmerge to compair a good install and the bad and could not find anything as to why it did it. All I could think of was that when one of the files got corrupt when I ftp'ed it to the site.

Link to comment
Share on other sites

Could be the module your using is cleaning the tags, you could a wysiwyg to input html like FCKeditor for Product Descriptions http://addons.oscommerce.com/info/2900

its an easy install.

 

Oddly enough, this isn't affecting Product Descriptions. This only affects the Admin section when displaying descriptions of Modules and other things that you can't edit. The front end is also unaffected by this. So, a WYSIWYG editor probably wouldn't help. Thanks for suggestion, though.

Link to comment
Share on other sites

is it possible that whatever you are displaying is running throught the strip_tags() function ?

 

I did a complete search of the files and the only reference to "strip_tags" were some Google Checkout files (not located in the Admin section). I checked to see if Google Checkout was being called in any files, but it appears all that information was removed at some point or never put in and the Google Checkout files were left over from a possible integration of the service that never went through.

Link to comment
Share on other sites

But what module are you using?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I had that problem awhile back and never did find a fix. The front end was not bothered by it so I just started rebuilding from scratch. I know its not what you want to hear but I never got a responce to my post at all. I even used winmerge to compair a good install and the bad and could not find anything as to why it did it. All I could think of was that when one of the files got corrupt when I ftp'ed it to the site.

 

If I had to do this, I'd probably just start with the Admin section and hope it's just a file in there (thus not affecting the front end). Otherwise, ... man oh man... it's gonna suck. :)

Link to comment
Share on other sites

If I had to do this, I'd probably just start with the Admin section and hope it's just a file in there (thus not affecting the front end). Otherwise, ... man oh man... it's gonna suck. :)

 

 

Yeah I didn't think of just doing the admin side. :blink: Was to ticked at the time.

Link to comment
Share on other sites

I seem to remember a rather long post a while back (maybe 8 or 9 months ago) about some of the HTML in the product description getting replaced by under scores.

 

As I recall the cause was determined to be inadvertant copying of a catalog file into the admin side.

 

I just don't recall which one at the moment....

:blink:

 

I'll have to do some searching.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I just found I still had an install of one that was doing that. version 2.2 rc1. I will try to find something again.

 

Glad you mentioned that. I'm using 2.2 RC1 too. Moving to RC2a is out of the question right now. Does make me want to test some things, now, though. I'll get to that right now!

Link to comment
Share on other sites

I have compaired almost every file I can think of that would have to do with the problem area with the files from rc2a and do notice anything diffrent. I have modded some of the files in the rc2a version. If your having the trouble with the site you redid the admin side for I think it best to find the problem.

Link to comment
Share on other sites

But what module are you using?

 

 

If he is having the same problem as I had it. All modules are effected even if there not installed or active.

 

Just relized we can also rule out a update of php. The one I have was transfered from a php 4 to a php 5 server.

Link to comment
Share on other sites

I couldn't find the thread, but from memory and looking at code I think it was caused when they put the /catalog/includes/functions/database.php into the admin/includes/functions folder.

 

It has to do with the function tep_db_prepare_input

 

The one in the catalog calls tep_sanitize_string which would cause the replacement.

 

The one in the admin doesn't sanitize the input.

 

So, if you put the catalog version into the admin - voila! - you get underscores where you shouldn't.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I couldn't find the thread, but from memory and looking at code I think it was caused when they put the /catalog/includes/functions/database.php into the admin/includes/functions folder.

 

It has to do with the function tep_db_prepare_input

 

The one in the catalog calls tep_sanitize_string which would cause the replacement.

 

The one in the admin doesn't sanitize the input.

 

So, if you put the catalog version into the admin - voila! - you get underscores where you shouldn't.

 

 

I will check those files now. Did even think those would effect it.

Link to comment
Share on other sites

There ya go!

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

There ya go!

 

YOU ARE THE MAN. Where were you a few months ago?? :lol:

 

Travis there's your problem. Here is a replacement file if you don't have the rc1 archive anymore Click ME

 

goes in admin/includes/functions. Think they need to add that to file description admin file /catalog file

Link to comment
Share on other sites

Sorry for the late response. Family, Holidays, and Sick. What a WONDERFUL week!

 

Either way, you guys ROCK!! Totally fixed the problem!!

 

Gotta jet, though. Family's still here and gotta go eat. Just had to check this quickly. :P Plus, another bug showed up, BUT that's for another time. Many thanks, everyone!!

Link to comment
Share on other sites

  • 10 months later...
 

  return trim(tep_sanitize_string(stripslashes($string)));

found in store with error

 

one with out error.

	  return trim(stripslashes($string));

 

Bushmaster YOU ARE THE BEST

 

i also have this problem since a few days, but i was trying a lot to find a solution but nothing. i was remaking the whole database.php but i didn't thought that the problem was at trim(stripslashes($string));

i thought that the problem accured because i set db characters to binary (greek_bin)

 

THANK YOU VERY MUCH TOO

Link to comment
Share on other sites

  • 3 months later...

Archived

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

×
×
  • Create New...