cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <u...@denic.de>
Subject Bug fixed in my version of fp.xsl
Date Wed, 24 Jan 2001 18:25:47 GMT
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

Mime
View raw message