Notifications
Clear all

Slashes Being Inserted

8 Posts
5 Users
0 Likes
1,812 Views
(@bunny)
Posts: 18
Active Member
Topic starter
 

I've been working on this for a couple of weeks and I can't for the life of me get rid of these extra slashes being input into my site.

http://pontapair.com

Where it's happening:

News Titles
Custom Pages (body) - I was able to fix these by inputting the text/code directly into mysql, but it doesn't work.
Chapter Titles

- Story bodies, but only if you click "preview" instead of "add story" and/or sometimes when the fic is uploaded as opposed to copy/paste - manually taking them out at this point seems to fix that, but especially on a long fanfic I could see this driving user's absolutely crazy.

My server does NOT have magic quotes enabled.

magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

I'm on DreamHost.

I'm running eFiction version 3.5.3. It's successfully bridged with SMF 1.1.16.

SMF is running just fine, no extra slashes, no problems with it at all.

In addition to the extra slashes I can't install Modules. I get this error:

Warning: require_once(chu/SSI.php) [function.require-once]: failed to open stream: No such file or directory in /home/pserenity/pontapair.com/includes/get_session_vars.php on line 24

Fatal error: require_once() [function.require]: Failed opening required 'chu/SSI.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/pserenity/pontapair.com/includes/get_session_vars.php on line 24

I have no idea if the errors are related, but I figured I'd share everything I know of that's not working properly just in case.

I really need to get this fixed, I'm hoping someone here can help me out. I'm so desperate.  πŸ˜₯  If you can help me out, please let me know if you need anything else from me and/or have questions, etc.

thank you all ^__^

My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)

 
Posted : 09/02/2012 8:11 am
(@julieann)
Posts: 60
Trusted Member
 

Wow, the boards here seem to be rather deserted.

I know this is a long shot, but you might want to see about reloading every single one of the files that is mentioned in the error as well as any that may apply to where you are working from (such as the submit story screen). Kinda a long shot, but thought I would throw that out there as I've had strange corruptions when only one or the other php file is a problem for some reason.

Julieann

Running 3.4.3 bridged with SMF and Coppermine
Mods: Challenges, cpg-art (not working), Limit Summary Length, Bio to Prefs, Top 20 instead of 10
Wants: Move Betareader to Prefs, Twitter
Gatchaman Fanfic Archive

 
Posted : 27/02/2012 12:42 am
 kali
(@kali)
Posts: 307
Reputable Member
 
/home/pserenity/pontapair.com/includes/get_session_vars.php

That mess is related to the smf bridge and it's specific to Dreamhost. I think if you search the forums for dreamhost + the error someone had a fix. I remember having the same issue and solving it, but I don't remember how.

Skins made by Kali are no longer supported!

 
Posted : 28/02/2012 12:32 pm
(@bunny)
Posts: 18
Active Member
Topic starter
 

I have tried reuploading the files. It didn't help at all. πŸ™

@ Kali I have extensively combed through everything about this on the forums here, the only ones I've found that had similar problems were either not the same problem as me, or were never resolved. (in the case of the story text slashes) It did help me when I was first setting up the site and bridging efic with smf, but this slash problem is just not going away, no matter what I try/do.  πŸ˜₯

I've got my pathtosmf working, not for the modules, (tried the fixes, didn't help) but I don't really care about the modules so much as my big problem which is the story submission form putting slashes in.

The big problem for me is if you "preview" a story submission the slashes are inserted into the "edit" box, so if you "submit" the story after that - there's slashes everywhere. If you don't preview it, and just click "submit" then it's fine. OF COURSE everybody is "previewing" their story first though, so I'm getting mess after mess after mess.

I've added in the edited versions of getting rid of the slashes in the header.php, I've tried putting it in on stories.php as well, just for good measure, didn't change a thing.

I've combed through the whole stories.php file and I don't even know php. I've messed with this so much it's crazy....and it's been going on for 3 months...I have NO IDEA why this is happening and it's driving me and my other users crazy. πŸ™ I can't launch my site though with it all broken like this, it's just never going to work if people can't submit their fanfics, you know?

My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)

 
Posted : 22/04/2012 9:00 am
(@lyndsie)
Posts: 1262
Member Moderator
 

Have you investigated the format_story function? I have a feeling it could be the culprit in conjunction with addslashes.

Standard disclaimer: as with any function in corefunctions.php and this one in particular as it deals with site security, be very very careful!

 
Posted : 28/05/2012 1:46 am
(@bunny)
Posts: 18
Active Member
Topic starter
 

Here's what it shows in my corefunctions


// Formats the text of the story when displayed on screen.
function format_story($text) {
      $text = trim($text);
      if(strpos($text, "<br>") === false && strpos($text, "<p>") === false && strpos($text, "<br />") === false) $text = nl2br2($text);
      if(_CHARSET != "ISO-8859-1" && _CHARSET != "US-ASCII") return stripslashes($text);
      $badwordchars = array(chr(212), chr(213), chr(210), chr(211), chr(209), chr(208), chr(201), chr(145), chr(146), chr(147), chr(148), chr(151), chr(150), chr(133));
      $fixedwordchars = array('&#8216;', '&#8217;', '&#8220;', '&#8221;', '&#8212;', '&#8211;', '&#8230;', '&#8216;', '&#8217;', '&#8220;', '&#8221;', '&#8212;', '&#8211;',  '&#8230;' );
      $text = str_replace($badwordchars,$fixedwordchars,stripslashes($text));
      return $text;

As far as I can tell, this is all fine. :/

My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)

 
Posted : 11/07/2012 6:41 am
(@hobert)
Posts: 61
Trusted Member
 

As a test, if you edit an existing chapter, and then preview it, do the slashes appear.

Also, is there any consistancy to where the slashes are added?  Like before double quotes (/") or any other characters?

efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 21/07/2012 2:12 pm
(@bunny)
Posts: 18
Active Member
Topic starter
 

They don't appear in the preview text, but they do appear in the edit box on the preview page, so if you have a pre-existing fic, edit it, preview it and then submit it, the slashes will show up in the text after the preview screen because they're inserted into the story box. (I hope this is all clear.)

It's the apostrophes and quotation marks. ' and " They all get a / in front of them after it's been previewed.

My eFiction Archives
http://smfanfiction.net
http://meijitales.com
http://pontapair.com (under construction)

 
Posted : 21/07/2012 7:06 pm
Share: