LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Override Escape of Control Characters in Output HTML or XML Node

    Employee
    Posted 11-19-2012 11:26

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rabbott

    I'd like to insert hyperlink text as table row data using the following standard format:

    <tr><td><a href="http://localhost">text</a></td></tr>

    However, the HTML and XML nodes escape the control characters. From the help file:

    "All data will be converted to text, and the four control characters will be escaped as &quot; ("), &amp; (&), &lt; (<), and &gt; (>).
    If more control over the format of the output is needed, use the core node Output XML, which this node inherits from."

    The XML node help also says "All data will be converted to text, and the four control characters will be escaped as &quot; ("), &amp; (&), &lt; (<), and &gt; (>)", so using the XML node, it's still not clear how one might override the escape of control characters.

    For example, I'm getting the following output from the HTML node:

    <TR>
    <TD>7</TD>
    <TD>&lt;blank&gt;||&lt;blank&gt;</TD>
    <TD>FMS in Red</TD>
    <TD>&lt;a href=&quot;https://na3.salesforce.com/5005000000BMiK0AAL&quot;&gt;00001351&lt;/a&gt;</TD>
    <TD>2011</TD>
    </TR>

    what I want is:

    <TR>
    <TD>7</TD>
    <TD>&lt;blank&gt;||&lt;blank&gt;</TD>
    <TD>FMS in Red</TD>
    <TD><a href="https://na3.salesforce.com/5005000000BMiK0AAL">00001351</a></TD>
    <TD>2011</TD>
    </TR>

    Thanks,

    - Bob


  • 2.  RE: Override Escape of Control Characters in Output HTML or XML Node

    Employee
    Posted 11-29-2012 13:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    The node currently escapes all the content that is loaded in from the fields, there is no way around that.

    If you want those sorts of tags, you generally need to do it in the parameters in the node. The "more control of the format" comment in the help is not really correct; the HTML node has values pre-populated, and at one point, we might have considered hiding them, which would have made the comment more applicable. Really, the HTML node is just the XML node with a lot more parameters pre-populated. There isn't any different level of control between them.

    Having the tags in the parameters works fine if the content is all the same, but in this case, it clearly isn't. You will need to create your formatted output using a filter or agg node, and then output it to the html file using a delimited node. To prevent the delimited node from escaping or complaining, you will need to make sure you choose delimiters that aren't showing up in the data.

    Cheers
    Rich