Notifications
Clear all

Edit Story: Stripping of Slashes

4 Posts
3 Users
0 Reactions
2,112 Views
(@senkusha)
Posts: 29
Eminent Member
Topic starter
 

When I tried to edit a story, (Future's Blessings)  When I'm finished, I get Future/'s Blessings.  If I edit again, I get Future//'s Blessings, if I edit again, I get Future///'s Blessings.  Somewhere I think the PHP function stripslashes($variable); is needed.


 
Posted : 07/05/2009 12:58 pm
(@itanshi)
Posts: 381
Reputable Member
 

Heh, not sure this is solved just yet, but nice find. I'll see if I can confirm.


I am rebuilding efiction! Join us on irc! #efiction at www.mibbit.com Instructions for irc πŸ˜€ Alpha released!

 
Posted : 07/05/2009 2:22 pm
(@senkusha)
Posts: 29
Eminent Member
Topic starter
 

I solved this:

In /stories.php in the function editstory (at about Line 622)

Find:


$title = isset($_POST['title']) ? strip_tags(descript($_POST['title']), $allowed_tags) : "";

Replace with:


$title = isset($_POST['title']) ? stripslashes(strip_tags(descript($_POST['title']), $allowed_tags)) : "";

I had to manually update the database to correct the insertion of '/' but now it appears to be working fine. πŸ™‚


 
Posted : 08/05/2009 11:01 am
(@tammy)
Posts: 2577
Member Moderator
 

You shouldn't need to strip the slashes.  They should already be stripped via header.php.  Not sure what's going on with your server configuration that it's not working.


 
Posted : 20/06/2009 12:58 am
Share: