| Author |
Message |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 17:07:48
|
stuart
Request-scope Wrangler
![[Avatar]](/rsf/images/avatar/a1d0c6e83f027327d8461063f4ac58a6.png)
Joined: 20/07/2007 17:14:34
Messages: 23
Location: Georgia Tech
Offline
|
I've got a label for a radio button that looks something like <label for="private" rsf-id:"msg=private">This message is <strong>private</strong>.</label> Where the message in the property file is the same as what I have in the tag there. The problem is when this gets rendered the text is html escaped so I get <strong> in the output. When using a UILabelTargetDecorator the html dosn't get escaped, and I can use markup in the msg, but I prefer the lighter syntax.
|
|
|
 |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 18:14:35
|
bobacus
Request-scope Wrangler
Joined: 21/08/2007 12:00:00
Messages: 92
Location: UK
Offline
|
Are you peering it with a UIOutput or UIVerbatim?
UIVerbatim should output without escaping.
Rob
|
|
|
 |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 18:41:05
|
stuart
Request-scope Wrangler
![[Avatar]](/rsf/images/avatar/a1d0c6e83f027327d8461063f4ac58a6.png)
Joined: 20/07/2007 17:14:34
Messages: 23
Location: Georgia Tech
Offline
|
When I'm using the UILabelTargetDecorator I use the UIVerbatim, and as you pointed out, that doesn't escape. I want to do this entirely in the template with rsf-id:msg= syntax though, and that appears to always escape. Maybe there should be something like rsf-id:vmsg= that would do a "verbatim" unescaped message from the property file.
|
|
|
 |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 18:41:43
|
antranig
Request-scope Wrangler
Joined: 03/04/2006 13:29:55
Messages: 643
Offline
|
Hi Stuart - two things... firstly, the "automatic 'for'" imputation should work whether the tag is being peered with a physical component (UIVerbatim) or a virtual one ("msg=foo"). So you should be able to keep your lighter syntax for label targets even if you have to escape the message by using a component... Yes, the use of markup in message files is somewhat "frowned upon" though it is supported, via the UIVerbatim(UIMessage) approach. Have you considered moving the font specifier <strong> outside the label? That would seem more natural.
Cheers,
A.
|
|
|
 |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 19:02:31
|
stuart
Request-scope Wrangler
![[Avatar]](/rsf/images/avatar/a1d0c6e83f027327d8461063f4ac58a6.png)
Joined: 20/07/2007 17:14:34
Messages: 23
Location: Georgia Tech
Offline
|
That's what I get for trying to do two things at once. Ok, yes I can do the "for" on its without the virtual component. I understand why markup in a message is frowned upon, but it seems my only other option is to split it into three messages which seems worse when all I'm trying to do is bold one word. I can't move the strong outside the label because the emphasized word is only a portion of the label. I guess I'll just live with the UIVerbatim for now.
|
|
|
 |
![[Post New]](/rsf/templates/default/images/icon_minipost_new.gif) 23/01/2009 19:09:29
|
antranig
Request-scope Wrangler
Joined: 03/04/2006 13:29:55
Messages: 643
Offline
|
I suppose we could extend the template system with something like rsf:id="msgv=foo" which will represent an escaped message. I will note it for the next release...
|
|
|
 |
|
|