Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: apostrophe in text causes problem when entering text in textarea  (Read 11654 times)

nexus6

  • Newbie
  • *
  • Karma: 0
  • Posts: 7

I am using sNews 1.3 and when I copy and paste text that contains any apostrophes into the text area when creating a new article it tells me that I have been succesful when I go to publish it yet when I refresh the site to view the new article it does not appear anywhere. If I manually escape the apostrophe by putting a '\' before it it works fine. Also, once the text is entered into an article it works ok when I edit it, can anyone help please. I am using 1.3 as I could not upload the htaccess file in 1.4 to my server. Thanks
Logged

George Antoniadis

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 479
apostrophe in text causes problem when entering text in textarea
« Reply #1 on: April 13, 2006, 07:19:49 PM »

Welcome to snews~! ;)

I'm not quite sure about this on 1.3 but converting the ' to html entities should work...
I'll check this and get back to you`! ^_^
Logged
How I feel like I'm starless, I'm ready to fade now.
And how I feel like I'm starless, I'm hopeless and greyed out.

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
apostrophe in text causes problem when entering text in textarea
« Reply #2 on: April 19, 2006, 07:59:31 PM »

Welcome Caludio,
Why not tell about your problems using 1.4 verion?
Maybe I or others can resolve these problems...
bram.
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
apostrophe in text causes problem when entering text in textarea
« Reply #3 on: April 19, 2006, 08:37:48 PM »

Maybe a stupid question from me, but, are your using the same database 1.3 for 1.4? or are you created a new db with the spects in the readme.txt of a snews 1.4 file?

Quote from: claudio
Well my problem is hard to explain, it seems that everything was right, mod rewrite is enabled, never had problems with friendly URLs, even enabled it to another codes like 4images. No problems. THe problems seems to be there, since it's the big difference between 1.3 and 1.4. All I got is a blank page with 1.4. Checked and re-checked phpinfo and my submitted info (like sql, username, etc) but neither worked. I'm happy with 1.3 and solving the apostrophe problem would be the final thing I need to do to this be the perfect thing for me ;)
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

Shaun Aneiros

  • Jr. Member
  • **
  • Karma: 2
  • Posts: 98
    • http://www.poorpeoplesparty.org
apostrophe in text causes problem when entering text in textarea
« Reply #4 on: April 19, 2006, 10:43:52 PM »

in your php.ini file? are shot tags on or off?
Logged
Why does my daughter like me to pose for pictures with my angry face?

nexus6

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
apostrophe in text causes problem when entering text in textarea
« Reply #5 on: April 26, 2006, 02:35:46 PM »

sorted it, I added a couple of lines in this section

function processing() {
   $action = $_REQUEST['action'];
     $id = $_REQUEST['id'];
     $name = $_POST['name'];
     $category = $_POST['category'];
     $description = $_POST['description'];
     $title = $_POST['title'];
     $comment = $_POST['editedcomment'];
     $text = $_POST['text'];
     $text_limit = $_POST['text_limit'];
     $auto_html = $_POST['auto_html'];
     $date = date('Y-m-d H:i:s');
     $display_title = $_POST['display_title'];
     $display_info = $_POST['display_info'];
     $commentable = $_POST['commentable'];
     $publish = $_POST['publish'];
     $publish_category = $_POST['publish'];
     $position = $_POST['position'];
     $display = $_POST['display'];
     $image = $_POST['image'];

I just added this to the above and it worked ok.

        $text = nl2br($text);
   $text = str_replace("'","''",$text);
Logged

nexus6

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
apostrophe in text causes problem when entering text in textarea
« Reply #6 on: May 03, 2006, 02:59:18 PM »

Good point, Cluadio. I had not thought of the comments section, as I have commenting turned off on this site at the moment. I will have a look at it soon and post a solution.
Logged