]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/XMLPage.pm
don't list planets and log board on all unread board
[ndwebbie.git] / ND / Web / XMLPage.pm
index ccdb7c511a07897dbf5777ba78b2ecc8da6475a2..853ef42e7e48a1019f9f90c025da0fa3fc6947b1 100644 (file)
@@ -95,6 +95,10 @@ sub render : method {
 
        $body = $self->render_body($body);
 
+       unless ($body){
+               return;
+       }
+
        unless ($self->{XML}){
                my $fleetupdate = $DBH->selectrow_array('SELECT landing_tick FROM fleets WHERE uid = ? AND fleet = 0',undef,$self->{UID});
 
@@ -125,6 +129,7 @@ sub render : method {
        $template->param(Error => $ND::ERROR);
        $template->param(BODY => $body->output);
        my $output = $template->output;
+       $output =~ s/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g;
        print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
        print $output;
 };