You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2001/01/24 19:25:47 UTC

Bug fixed in my version of fp.xsl

Hello,

This report may be of interest to anyone writing user input from HTML
forms to XML files.

I am working here with a modified version of the fp.xsl stylesheet (I've
added a template named fp:write-all-parameters). Today I fixed a bug in
this template, which caused fp to write an additional return character,
for every return character it encountered in the user input. This
applies to editing XML files, not to adding new XML nodes (which I still
haven't got to work).

Anyone, who writes user input from HTML forms to XML files may encounter
this issue (specifically anyone using the standard fp:write template
from the fp taglib), so here is a description of it as far as I could
resolve it:

When you have a multi-line input field in HTML and the user enters text
with returns, then - depending on the platform the Browser is running on
- these returns are encoded differently. So you may have to translate
these returns in a way that the XML files get written with the correct
returns for the platform they are stored on.

In my case I got away with stripping all "\r" characters, because I
store on UNIX, where they are not needed.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung