Changeset 332


Ignore:
Timestamp:
Jun 15, 2006, 6:41:11 PM (13 years ago)
Author:
nick
Message:

Since we include the site and atom URLs in the XML, we need to XML escape them, otherwise we end up with a non valid feed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/Atom.pm

    r331 r332  
    4747  $self->{utc_offset} =~ s/(..)(..)$/$1:$2/;
    4848 
     49  # Escape any &'s in the urls
     50  foreach my $key qw(site_url atom_link) {
     51     my @ands = ($self->{$key} =~ /(\&.{1,6})/g);
     52     foreach my $and (@ands) {
     53        if($and ne "&") {
     54            my $new_and = $and;
     55            $new_and =~ s/\&/\&/;
     56            $self->{$key} =~ s/$and/$new_and/;
     57        }
     58     }
     59  }
     60
    4961  $self;
    5062}
Note: See TracChangeset for help on using the changeset viewer.