Index: trunk/extensions/UploadWizard/resources/mw.Title.js |
— | — | @@ -42,13 +42,13 @@ |
43 | 43 | var ext = null; |
44 | 44 | |
45 | 45 | /** |
46 | | - * strip every illegal char we can think of |
| 46 | + * strip every illegal char we can think of: control chars, colon, less than, greater than, whitespace |
47 | 47 | * yes, I know this leaves other insanity intact, like unicode bidi chars, but let's start someplace |
48 | 48 | * @return {String} |
49 | 49 | */ |
50 | 50 | function clean( s ) { |
51 | 51 | if ( mw.isDefined( s ) ) { |
52 | | - return s.replace( /[\x00-\x1f\s]+/g, '_' ); |
| 52 | + return s.replace( /[\x00-\x1f\x3a\x3c\x3e\x7f\s]+/g, '_' ); |
53 | 53 | } |
54 | 54 | } |
55 | 55 | |