r88 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87‎ | r88 | r89 >
Date:02:19, 8 February 2002
Author:vibber
Status:old
Tags:
Comment:
Roughly following the same title char forbidding as usemod
Modified paths:
  • /trunk/phpwiki/fpw/wikiTitle.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/wikiTitle.php
@@ -76,8 +76,9 @@
7777 $s = str_replace ( "\\\"" , "" , $s ) ;
7878 #$s = str_replace ( "\"" , "" , $s ) ;
7979 # All non-alpha ASCII chars: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\127
80 - # FIXME: Decide exactly which ones to forbid.
81 - $s = preg_replace ( "/[\"\#\$\%\&\\<>\[\]\{\|\}\127]/", "", $s);
 80+ # FIXME: Currently following Usemod rules for forbidding chars, except for /, :, and 0x80-0xc0 range for UTF-8
 81+ # Do we want that?
 82+ $s = preg_replace ( "/([^-,.()' _0-9A-Za-z\/:\x80-\xff])/", "", $s);
8283
8384 # Make it compatible with old wiki
8485 $s = str_replace ( " " , "_" , $s ) ;

Status & tagging log