Passing HTML in an attribute...

3 replies [Last post]
Joined: 11/05/2009
Points: 26

I have a custom module that works, but I want to pass the HTML text it displays from the uiConf so it's confgurable. I've tried the proper:

<Module id="richTextDescription" k_path="XXX" width="100%" height="100%">
        <htmlText>
                <![CDATA[<b>blah</b> <i>blah</i>]]>
        </htmlText>
</Module>

The uiConf didn't like that at all as I got an XML error: "unterminated attribute". Then, I tried inlining it:

<Module id="richTextDescription" k_path="XXX" width="100%" height="100%" htmlText="<b>boo</b>">

Same error. Then, I tried encoding:

<Module id="richTextDescription" k_path="XXX" width="100%" height="100%" htmlText="&lt;b&gt;boo&lt;/b&gt;">

Same thing. Only if I pass plaintext does it work:

<Module id="richTextDescription" k_path="XXX" width="100%" height="100%" htmlText="boring old plaintext">

So, how can I pass these variables into my module?

Joined: 01/05/2009
Points: 1697

Hi,

Please use the wrapping code tag to code parts in your msgs ( [ language ] code here... [ /language ] )
You can edit your message to see how it should be done.

I wonder if when you pass encoded text it throw the same error?
Did you try to debug and see what the value of the uiConf looks like when being loaded to the player?

Joined: 11/05/2009
Points: 26

I'll try to find where that piece is and see. I assume the error is in the parsing, not the content, tho. Thanks.

Joined: 11/05/2009
Points: 26

Looks like the issue was a caching issue. I was just seeing wrong results because of the cache, not what I was doing. Except for the first usage where the attribute is in a tag, the others work now.