PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   ReviewPost Bug Reports (http://www.photopost.com/forum/reviewpost-bug-reports/)
-   -   Backslashs comments bug (http://www.photopost.com/forum/reviewpost-bug-reports/112998-backslashs-comments-bug.html)

caliman March 21st, 2005 09:15 PM

Backslashs comments bug
 
I've noticed that if you use apostrophes in comments, it adds a backslash before the apostrophe when you post. I guess an expression is needed here.
I think this also occurs with reviews.

Chuck S March 22nd, 2005 09:59 AM

Interesting thing is yes slashes are suppose to be added to the comment when it goes to the database and I show we strip them out in showphoto when they are displayed.

$commenttextline = convert_markups(stripslashes($commenttextline));

What does a typical database comment look like in your database? Is your comment being entered with multiple slashes?

caliman March 23rd, 2005 11:13 PM

Sorry Omega, please move this to the reviews bug page.

"Pros: Easy to use, small foot print, good price.
Cons: It\'s good, but I think it"

paratek March 30th, 2005 01:57 PM

1 Attachment(s)
I am getting this same thing in Photopost. Attached is what my database looks like with the slashes in the comments.

caliman March 30th, 2005 03:02 PM

I think it's supposed to do that. I think it handles general comments in posts ok and when it displays them it looks fine.

But the PROS/CONS fields are another story.

paratek March 30th, 2005 03:29 PM

No, it is not handling them right....the slashes are dispalyed as well. I have to go through the database and take them out.

caliman March 30th, 2005 04:21 PM

Ugh. That's a little different than my problem. Do you get them in the Pro/Con fields too?

Chuck S March 30th, 2005 05:39 PM

I asked a question above noone ever answered.

I show the proper use of addslashes and stripslashes in the comments.

How many stripslashes are in your database for a typical character that needs it. There is some users who have some mysql setting that like triples the normal use of addslash and that might be the issue

Same thing on pro's and con's I show this in showproduct

$cons[$itemnum] = stripslashes($consline);
$pros[$itemnum] = stripslashes($prosline);


so I really need to see an example of how the database is storing it

paratek March 30th, 2005 06:29 PM

Chuck,

I attached a screen shot in my post a few above of my database as it looks through myphpadmin that shows the slashes. I'm sorry, i thought that was what you asked for.

Quote:

Originally Posted by omegatron
I asked a question above noone ever answered.

so I really need to see an example of how the database is storing it


Chuck S March 30th, 2005 06:35 PM

Paratek yep did not see your attachment. You have one slash when is normal and we remove that upon install

Do you not have this in showproduct.php

$commenttextline = convert_markups(stripslashes($commenttextline));

paratek March 30th, 2005 09:08 PM

Oh shoot, Chuck i thought i was in the photopost forum on this. I did a search and posted this in the wrong spot. My problem is with photopost. Sorry

but i do have this in showphoto.php

$commenttextline = convert_markups(stripslashes($commenttextline));

Chuck S March 31st, 2005 08:26 AM

No problem but you should not have slashes if you only have one slash which is normal in the database. Can you post a url to look at?

paratek March 31st, 2005 08:56 AM

You know what, I added another comment with an apostrophe. when i view it in photopost it displays correctly, the slash has been stripped. When i view it using Toney's comshow.php is when it is showing up. So it is Toney's fault, not yours..lol
I'll check with him. Sorry for the trouble Chuck.

Chuck S March 31st, 2005 09:03 AM

No Problem LOL Now you know why companies dont support hacking ;)

caliman March 31st, 2005 11:06 AM

omega what table has the pros/cons info? I'd like to see how it's storing the slashes.

Chuck S April 1st, 2005 09:10 AM

Same table reviews

couple fields over the the review itself

memobug April 6th, 2005 01:47 AM

There are still some slashes problems!
 
Quote:

Originally Posted by omegatron
show the proper use of addslashes and stripslashes in the comments.

The comment field itself is okay but I think it's the exception. Unfortunately there are still some addslashes problems with various fields. (Review PRO & CON, user-specified fields,) Try entering these in a review.

Positive aspects of the product (pros): it's a test
Negative aspects of the product (cons): it's a test

Now click Edit and it looks like this:

it\'s a test
it\'s a test

Submit it and it's like this

Pros: it\'s a test
Cons: it\'s a test


Edit it and it's like this

Pros: it\\\'s a test
Cons: it\\\'s a test

etc.

Michael P April 6th, 2005 08:03 AM

In reviews.php at line 133, find and add the code in bold:

Code:

Content visible to verified customers only.

memobug April 7th, 2005 05:27 AM

Thanks Michael

caliman April 7th, 2005 10:42 AM

Cool. Thanks.


All times are GMT -5. The time now is 03:46 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97