[Logo] RSF Discussions Forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
rsf-id:"msg=foo" doesn't work when foo contains markup  XML
Forum Index -> RSF Help and Problems
Author Message
stuart
Request-scope Wrangler
[Avatar]

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 &lt;strong&gt; 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.
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
stuart
Request-scope Wrangler
[Avatar]

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.
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.
stuart
Request-scope Wrangler
[Avatar]

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.
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...
 
Forum Index -> RSF Help and Problems
Message Quick Reply
Go to:   
Powered by JForum 2.1.6 © JForum Team