Commit d068eab8 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

DeutscheBahn.pm: Strip leading/trailing whitespace in result fields

parent 1bf2ad57
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
git HEAD

    [Travel::Status::DE::DeutscheBahn]
    * Strip leading / trailing whitespace in result fields

Travel::Status::DE::DeutscheBahn 0.02 - Wed Jul 06 2011

    [db-ris]
+3 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ sub new {
		confess("Could not submit POST request: ${errstr}");
	}

	$ref->{html} = $reply->content();
	$ref->{html} = $reply->content;

	$ref->{tree} = XML::LibXML->load_html(
		string            => $ref->{html},
@@ -138,6 +138,8 @@ sub results {
		for my $str ( $time, $train, $dest, $platform, $info ) {
			$str =~ s/\n/ /mg;
			$str =~ tr/ //s;
			$str =~ s/^ +//;
			$str =~ s/ +$//;
		}

		$info =~ s{ ,Grund }{}ox;