Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Problem with apostrophes in title  (Read 1146 times)

yule

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
Problem with apostrophes in title
« on: November 23, 2010, 10:04:33 am »

Hello,

I can not solve the problem of apostrophes in admin.js

Currently
C'est l'été => cest-lete (URI false)

To be fair, it should be so
C'est l'été => c-est-l-ete (URI true)

Have you any idea str_replace it takes?

In advance thank you
Yule
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: Problem with apostrophes in title
« Reply #1 on: November 23, 2010, 11:11:09 am »

Modify admin.js (function genSEF)

Replace the last two string replacement with :

Code: [Select]
                str = str.replace(/[^a-z0-9]+/g,'-'); // replace all non alpha numeric with hyphen
                str = str.replace(/-+$/g, "");  // remove all trailing spaces
 
Logged

yule

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
Re: Problem with apostrophes in title
« Reply #2 on: November 23, 2010, 02:00:55 pm »

re,

Perfect thank you, it's all good!

I added this in at snews flux rss


Code: [Select]
$articleSEF = $r['seftitle'];
$title = $r['title'];
$text = $r['text'];
$title = str_replace("'","'",$title); // replace apostrophe
break;
case 'rss-comments':
$subquery = "SELECT id FROM "._PRE.'comments'."

Cordially and sorry for my english...
Yule
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: Problem with apostrophes in title
« Reply #3 on: November 23, 2010, 02:04:07 pm »

Cordially and sorry for my english...
Yule

Ton anglais est parfait :-)
Logged