You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by tz...@s-und-n.de on 2007/01/10 14:40:10 UTC

CForms: Escape Characters in Widget Label Definitions

Hi,

it's been quite a few times that i stumbled over this bug (or feature (i'm 
not quite certain which one it is ;-) )). when defining a widgets label 
you cannot use any escape characters if the widget is to be rendered as a 
button in HTML.

Quite a few Browsers (incl. Firefox & IE) do render theses Escape 
Characters within Buttons (Button Labels in HTML are (X)HTML-Attributes 
after all). That  means that Label Definitions as the following cannot be 
used for Button Widgets:
  ...
  <fd:label>
    <i18n:text key=
"forms.administrationcustomercategorydetails.entries.mkz.label" />
  </fd:label>
  ...
Usually you would want to write XML somewhat readable. Due to the fact 
that Escape Characters like Tab, Carriage Return etc. are rendered though 
you cannot write XML readable in this particular case. You would need a 
definition like the following:
<fd:label><i18n:text key=
"forms.administrationcustomercategorydetails.entries.mkz.label" 
/></fd:label>

My suggestion to this problem is to trim the Label before rendering it, 
unless there are scenarios which demand Escape Characters to be rendered 
in a Widget Label (which of course would make this whole thing a feature 
rather than a bug ;-) ).

Comments?

Freundliche Grüße / With kind regards
Thomas Zirke

S&N AG
Klingenderstr. 5
D 33100 Paderborn

voice   +49 5251/1581-984
fax     +49 5251/1581-71
eMail   tzirke@s-und-n.de
Web     http://www.s-und-n.de