You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Edward Nunez <ed...@oracle.com> on 2000/11/29 17:23:26 UTC

FP is messing up with
when writing as="node"

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?

I have Cocoon 1.8 running / Apache JServ / Windows 98 & NT 4.0

Any help is appreciated,

Thanks,

Edward.

Re: FP is messing up with
when writing as="node"

Posted by Edward Nunez <ed...@oracle.com>.
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
>
>    <ma...@mac.com>                    <http://www.media.demon.co.uk>
>     <phone:+44.[0].20.7737.6831>        <pa...@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

Re: FP is messing up with
when writing as="node"

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
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

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>