Skip to content
Browse files

fix encoding

  • Loading branch information...
1 parent 5bbbae5 commit 4fa8b3b9cffad6ed179f097845c4a98beb47e4fa @pudge pudge committed Jul 12, 2007
Showing with 7 additions and 7 deletions.
  1. +7 −7 Slash/XML/Atom/Atom.pm
View
14 Slash/XML/Atom/Atom.pm
@@ -176,7 +176,7 @@ sub as_atom_1_0 {
my $lang = '';
if ($self->{channel}{dc}{language}) {
- $val = $self->encode($self->{channel}{dc}{language});
+ $val = $self->{channel}{dc}{language};
$lang = qq[ xml:lang="$val"\n];
}
@@ -186,14 +186,14 @@ sub as_atom_1_0 {
$output .= atom_encode($self, 'title', $self->{channel}{title});
# id/link
- $val = $self->encode($self->{channel}{'link'});
+ $val = $self->{channel}{'link'};
$output .= qq[<id>$val</id>\n];
$output .= qq[<link href="$val"/>\n];
# self link
$val = '';
if ($self->{channel}{selflink}) {
- $val = $self->encode($self->{channel}{selflink});
+ $val = $self->{channel}{selflink};
} elsif ($ENV{REQUEST_URI}) {
(my $host = $ENV{HTTP_HOST}) =~ s/:\d+$//;
my $scheme = defined &Slash::Apache::ConnectionIsSSL
@@ -230,7 +230,7 @@ sub as_atom_1_0 {
# subject
if ($self->{channel}{dc}{subject}) {
- $val = $self->encode($self->{channel}{dc}{subject});
+ $val = $self->{channel}{dc}{subject};
$output .= qq[<category term="$val"/>\n];
}
@@ -262,7 +262,7 @@ sub as_atom_1_0 {
if ($item->{title}) {
$output .= "<entry>\n";
- $val = $self->encode($item->{'link'});
+ $val = $item->{'link'};
$output .= qq[<id>$val</id>\n];
$output .= atom_encode($self, 'title', $item->{title});
@@ -286,7 +286,7 @@ sub as_atom_1_0 {
}
if ($item->{dc}{subject}) {
- $val = $self->encode($item->{dc}{subject});
+ $val = $item->{dc}{subject};
$output .= qq[<category term="$val"/>\n];
}
@@ -314,7 +314,7 @@ sub as_atom_1_0 {
sub atom_encode {
my($self, $element, $value) = @_;
return '' unless $value;
- $value = $self->encode($value);
+
# XXX make this more robust?
my $type = $value =~ /(?:&amp;#?\w+;|&[lg]t;)/ ? 'html' : 'text';

0 comments on commit 4fa8b3b

Please sign in to comment.
Something went wrong with that request. Please try again.