Hey all

(Apologies for the cross post to cfaussie, but that list is running like a dog today.. 
so are all of 
daemon's servers it seems)

I got a weird one - 

If you have:

--- myObj.cfc ---
<cfcomponent>

        <cfscript>
                instance = Structnew();
                instance.myVar = "";
        </cfscript>

        
        <cffunction name="getMyVar" access="public" returntype="string">
                <cfreturn instance.myVar>
        </cffunction>
</cfcomponent>
--------------------

and you run:

--- index.cfm ---
<html>
<head>
<title></title>
</head>
<body>

        <cfscript>
                o = createObject("component", "myObj");         
        </cfscript>
        
        <cfoutput>
        <pre>
        [#o.getMyVar()#]
        </cfoutput>
        </pre>

</body>
</html>
--------------------

You end up with an output of:

--------
      [
                  ]
--------

when you should be getting
--------
      []
--------

i.e. - You have these line breaks in the string, when the string (instance.myVar = 
"";) doesn't 
have any line breaks.

Which means when you:

<input type="text" value="#o.getMyVar()#">

will output as

<input type="text" value="
           "> 

With obvious annoying implications.

I've tried all manner of stripcr(), and trim() to solve this issue, but has anyone 
else come 
across this?

I'm totally at a loss.

Thanks in advance.

Mark
------------------------------------------------------------------
[EMAIL PROTECTED]
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to