PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Automatic addslashes when creating a category description(FIXED) (http://www.photopost.com/forum/classifieds-bug-reports/115012-automatic-addslashes-when-creating-category-description-fixed.html)

Gliderstyle July 24th, 2005 08:51 AM

Automatic addslashes when creating a category description(FIXED)
 
Hello, when I use the ' in the category description, the description automatically "addslashed" resulting in this :
Any kind of equipment that doesn\'t fit into another category.
Thanks

Chuck S July 25th, 2005 08:02 AM

In adm-misc.php find these

Code:

Content visible to verified customers only.
change to this

Code:

Content visible to verified customers only.

Gliderstyle July 25th, 2005 01:28 PM

Addslashes problems
 
Thanks for the answer but I encountered the same problem when updating templates. I update some templates via the admin section and all the updated templates code are automatically "addslashed" resulting in code execution error. Here an example of a part of the menubar.tmpl after the update :
<?php
echo <<<PPPRINT
$ppopen
<tr>
<td class=\"{$Style[\'menubar\']}\" width=\"100%\" colspan=\"2\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<!-- modif knapy inversion des menu et menu 2 --->
<td class=\"{$Style[\'menubarnb\']}\" width=\"50%\" align=\"left\" valign=\"middle\">
&nbsp;$menu
</td>
<td class=\"{$Style[\'menubarnb\']}\" width=\"50%\" align=\"right\"valign=\"middle\">
$menu2&nbsp;&nbsp;
</td>
</tr>
</table>
</td>
As you can see all the code has been "addslashed".
Greetings

Chuck S July 25th, 2005 02:00 PM

1 Attachment(s)
Okay I went through the whole file with a fine tooth comb try this file

Gliderstyle July 26th, 2005 12:59 PM

Addslash problem
 
Hello, I used the updated adm-misc.php file to test but the problem remains the same. I corrected the templates via my editor and they work fine again but when I want to update them via the admin section, the problem is still there.
Greetings

Chuck S July 26th, 2005 01:18 PM

If I use that file I can surely edit templates without slashes getting added or cat desc title etc in cat editor

Remember you need to actually remove the slashes and then save

Gliderstyle July 27th, 2005 02:04 AM

Addslashes added in templates
 
OK, but even if I remove the slashes manually, the templates stays automatically "addslshed" for all the characters like " or '. Have a look at the diewell.tmpl template after 3 saves using the updated adm-misc.php file you provided me (I didn't remove the slashes manually between saves for showing the problem):
<?php

echo<<<PPPRINT
<br />
$ppopen
<tr>
<td colspan=\\\\\\\"2\\\\\\\" align=\\\\\\\"left\\\\\\\" class=\\\\\\\"{$Style[\\\\\\\'menubar\\\\\\\']}\\\\\\\">
<span class=\\\\\\\"{$Style[\\\\\\\'medium\\\\\\\']}\\\\\\\"><b>{$Globals[\\\\\\\'galleryname\\\\\\\']} Message</span>
</td>
</tr>
<tr>
<td class=\\\\\\\"{$Style[\\\\\\\'tdbackground\\\\\\\']}\\\\\\\" height=\\\\\\\"300\\\\\\\" valign=\\\\\\\"middle\\\\\\\" align=\\\\\\\"center\\\\\\\">
<span class=\\\\\\\"{$Style[\\\\\\\'large\\\\\\\']}\\\\\\\"><b>$message</b></span>
</td>
</tr>
$ppclose
<br />

PPPRINT;

?>
I never had that problem before. It started after 2.41 installation. I update my templates via my html editor now but I would like to know also if other people have this kind of problem when they update via admin ?

Chuck S July 27th, 2005 09:00 AM

I have tried this file many many times on my own install and the one I posted above does not add slashes to the files

snoopy5 August 4th, 2005 08:59 AM

I can second Omegatron. I use Classified 2.41.

I just overwrote the old file with the one omegatron uploaded above and my quote problem disappeared.

No matter how often I did edit the category afterwards :)


All times are GMT -5. The time now is 03:17 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