[jdom-interest] < not allowed in attribut

Michel Gutierrez mig at jasm.org
Sat Jan 19 06:13:33 PST 2002


In Boerries's case you need also to escape < with &lt; and > with &gt;

I believe, that should be done by JDOM when calling the 
Element.setAttribute() method ?

/mig

On Saturday 19 January 2002 08:16, bob mcwhirter wrote:
> Typically, you need to escape those values when building
> HTML/XML with them.
>
> It's a 3-step process, typically:
>
> 	1) Escape all instances of '&' to '&amp;'
> 	2) Escape all instances of ''' (single-quote) to '&apos;'
> 	3) Escape all instances of '"' (double-quote) to '&quot;'
>
> I'm pretty much certain that there's got to be a class
> floating around the net to do this for you, but I always
> tend to write my own using jakarta-regexp or OROMatcher,
> or something similar.
>
> 	-bob
>
> On Sat, 19 Jan 2002, [iso-8859-1] Börries Ludwig wrote:
> > Hi,
> >
> > sorry for this beginners question:
> >
> >
> > <INPUT TYPE="SUBMIT" WIDTH="100" NAME="method" Value="< Ansehen"/>
> > ------------------------------------------------------^
> >
> > Why can I not use a < in a value ???  Is there any workaround ? This
> > value is in my database, I cannot use another one.
> >
> > Many thanks in advance
> >
> >    Boerries
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@your
> >host.com
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourho
>st.com



More information about the jdom-interest mailing list