* Add enclair_db option to UserDB.pm. Allows logging of enclair password
[interchange.git] / code / Filter / space_to_nbsp.filter
1 # Copyright 2002-2007 Interchange Development Group and others
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.  See the LICENSE file for details.
7
8 # $Id: space_to_nbsp.filter,v 1.3 2007-03-30 23:40:45 pajamian Exp $
9
10 CodeDef space_to_nbsp Filter
11 CodeDef space_to_nbsp Description All SPACE to nbsp
12 CodeDef space_to_nbsp Routine <<EOR
13 sub {
14         my ($str, $tag, $opt) = @_;
15
16         if ( $opt ) {
17                                         $str =~ s/ +/&nbsp;/g;
18                                 } else {
19                                         $str =~ s/ /&nbsp;/g;
20                                 }
21
22         $str;
23 }
24 EOR