[TYPO3-english] RealUrl: Convert apostrophe to hyphen

David ARNOULT - Edition & Internet Operations d.arnoult at topsolid.com
Tue Apr 13 17:11:05 CEST 2010


This is cool, thanks Tomas it works great with those 2 lines :-)
...
$processedTitle = preg_replace('/[ \-+_\']+/', $space, $processedTitle); // convert spaces
...
$processedTitle = preg_replace('/[^a-zA-Z0-9\'\\' . $space . ']/', '', $processedTitle); // strip the rest

Another question :

Since you said this :
However, you should not change the original RelURL source. But using your own modified and renamed copy of that class and setting it in $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['pagePath']['userFunc']
would be fine in my opinion. Dmitry might disagree, though.

How can I save these 2 modifications by not modifying the original source? Can you explain the process?
Sorry for this newbie question...

David 
-----Message d'origine-----
De : Tomas Mrozek [mailto:mail at cascaval.com] 
Envoyé : mardi 13 avril 2010 16:28
À : d.arnoult at topsolid.com
Objet : Re: [TYPO3-english] RealUrl: Convert apostrophe to hyphen

Hi,

Single backslash should do the job:

$processedTitle = preg_replace('/[ \-+_\']+/', $space, $processedTitle);

Tomas Mrozek
--
PS: Please try to keep the conversation within the News server so that
other users can benefit from it in future.




More information about the TYPO3-english mailing list