Ignore:
Timestamp:
05/24/09 12:15:55 (3 years ago)
Author:
CrawfordCurrie
Message:

Item1603: use quotes to protect topic names with odd characters in them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Subscription.pm

    r2957 r3974  
    6868    my $record = $this->{topics}; 
    6969 
    70     # convert RE back to wildcard 
    71     $record =~ s/\.\*\?/\*/; 
     70    # Protect non-alphanumerics in topic name 
     71    if ($record =~ /[^*\w.]/) { 
     72        if ($record =~ /'/) { 
     73            $record = "\"$record\""; 
     74        } else { 
     75            $record = "'$record'"; 
     76        } 
     77    } 
    7278    $record .= $this->getMode(); 
    7379    $record .= " ($this->{depth})" if ( $this->{depth} ); 
Note: See TracChangeset for help on using the changeset viewer.