Problems reading params

Subject: Problems reading params
From: Matt Watson <Matt.Watson@xxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Sep 2000 10:59:43 +0100
Hi,

I have a form that includes a textarea. When this form is submitted and the
value from the query 
string is read. I find that for some reason if the value includes carrige
returns it is not correctly
being displayed. As additional blank lines have appeared.

Say this is my xsl sheet.

<xsl:stylesheet etc>

<xsl:param name="test"/>

<xsl:template match="data">

  ..... etc 

  <form>
    <textarea name="test"><xsl:value-of select="$test"/></textarea>
    <input type="submit"/>
  </form>

</xsl:template>
</xsl:stylesheet>

pretend this is the textarea defined above. If I enter say:

 ------------------------
 |ab				|
 |cd				|
 | 				|
 ------------------------

then
 ----------
 | Submit |
 ----------

which produces the query string ?test=ab%0D%0Acd

when I re-display the value as in the above code.

 ------------------------
 |ab				|
 | 				|    <-- Suddenly there is an extra line
here.
 |cd				|
 ------------------------

Any ideas about what I am doing wrong? Do I need to run a function on $test
before I display it?

Oh and I'm using Cocoon 1.7.4

thanks in advance,
Matt.

*********************************************************************************************************************
This email transmission is confidential and intended for the addressee only. If you are not the intended recipient,
please notify IT Support by telephoning +44 (0)20 7404 4490 before deleting this message from your computer.

The views and opinions expressed in this email message are the author's own and may not reflect the views and 
opinions of Rufus Leonard.
*********************************************************************************************************************




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread