cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Nunez <edward.nu...@oracle.com>
Subject Re: FP is messing up with <BR/> when writing as="node"
Date Thu, 30 Nov 2000 22:02:47 GMT

Thanks a lot  Jeremy,

Please announce when you release it.

Thanks,

Edward.

Jeremy Quinn wrote:

> At 08:23 -0800 29/11/00, Edward Nunez wrote:
> >I'm using FP to enter HTML text into a field, and then rendered the
> >result
> >with a browser.
> >
> >If the contents of the field contains <BR/> FP is not handling properly,
> >
> >Try the following in the sample fp page, edit an entry and insert
> >somewhere
> >in the body text a <BR/>, save it... up to this point everything seems
> >okay,
> >now try editing the same entry, and save it again... FP transform <BR/>
> >to
> ><BR> and it's complaining now that element type 'BR' must be terminated.
> >
> >Is this a bug? is it fixed in an already release version?
>
> This is a known problem.
>
> There are a set of tags that get effected by the HTMLFormatter. If you have
> these tags in your XML source that you are editing via FP, they get messed
> up by the HTMLFormatter.
>
> Like these:
>
>         <br/> becomes <br>
>         <input/> becomes <input>
>         <li>blah</li> becomes <li>blah
>         <option>blah</option> becomes <option>blah
>
> etc.
>
> I do not know how to tell the HTMLFormatter not to touch <textarea/> tags
> for instance.
>
> The solution I have come up with in the version of FP I am working on is a
> new tag <fp:to-string/> that uses the XSPUtil.toMarkup method to convert
> the XML you want to edit into HTML Entities before putting it inside your
> form elements.
>
> This stops the HTML Formatter from messing around with your tags, but still
> allows you a proper Tag-View to edit in your form, ie. the browser displays
> your entityised XML as proper XML text.
>
> regards Jeremy
>
> --
>    ___________________________________________________________________
>
>    Jeremy Quinn                                           Karma Divers
>                                                        webSpace Design
>                                             HyperMedia Research Centre
>
>    <mailto:sharkbait@mac.com>                    <http://www.media.demon.co.uk>
>     <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Mime
View raw message