Gossamer Forum
Quote Reply
Removing Whitespace
Hi,

I am making an ZML feed but run into errors with Whitespaces...

I have used the following Global to strip the content from things that could damage XML - but still get an error.


Code:
sub {
my $tags = shift;
my $review = $tags;
$review = GT::CGI::html_escape($review);
$review =~ s/^\s+|\s+$//g;
$review =~ s/\n/<BR \/>/g;
$review =~ s/\&lt\;BR&gt\;/<BR \/>/g;
return $review;
}


Any suggestions are welcomed...

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Removing Whitespace In reply to
What's the error?
Quote Reply
Re: [Paul] Removing Whitespace In reply to
When I open the page I get an XMl error saying a Whitespace can't be in that location...

Klaus

http://www.ameinfo.com
Post deleted by Clint In reply to
Quote Reply
Re: [Paul] Removing Whitespace In reply to
Got it solved - thanks for your help... A field that was not run through the global was causing it..

Frown
Klaus

http://www.ameinfo.com