you can also manipulate the CF servlet response before sending the server
response.  The following would remove linefeeds (chr 10 and 13) from the
response (you'd want to put this in onRequestEnd.cfm or at the bottom of the
appropriate page):

<cfscript>
pageOut = getPageContext().getCFOutput().getString();
pageOut = replaceNoCase(variables.pageOut,chr(13),"","All");
pageOut = replaceNoCase(variables.pageOut,chr(10),"","All");
</cfscript>
<!---:: reset the content type and flush the buffer, then rewrite the buffer ::-
-->
<cfcontent type="text/html" reset="yes">
<cfoutput>#variables.pageOut#</cfoutput>

~Simon

>
> On Thu, 5 Aug 2004 10:43:40 -0500, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> > I have Whitespace Management enabled in the CF administrator, but still I am
> > getting a little whitespace at the top of the page when I view the source.
> > Is there a tag that can further suppress this or am I just screwed? I am
> > trying to do a conversion from a CF Query to an RSS/XML output. The XML is
> > fine and the RSS tag is placed where it is supposed to be, but my RSS reader
> > (pluck) is not recognizing it as a valid RSS document. I suspect it is the
> > whitespace that is causing the issue, although I am just guessing here. The
> > site is http://www.sorge.net/rssfeed.cfm. It is not working right in IE, but
> > Firefox and Nutscrape is showing the site. Just view the source and you will
> > see what I am talking about.
>
> The easiest thing you could probably do is use the cfcontent tag with
> the appropriate content type, but making sure to use the reset="yes"
> attribute to flush out everything up to the beginning of your feed,
> like so:
>
> <cfcontent type="text/xml" reset="Yes"><cfoutput>#myXMLString#</cfoutput>
>
> Something like that should help resolve this. I've hit it several times.
>
> Regards,
> Dave.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to