Subscript HTML Not Rendering correctly in Report Module

In 7.9.13 we are building some new reports that have some text blocks stored in a DB. The content is HTML that is rendered in a text box in the report.

I’m trying to use sub-script tag and it is no rendering properly, it seems reporting never sees the close tag. Any other way of passing a subscript in from the DB?

image

<html>
<ul>
    <li>Pocket centerlines to cavity center, not to pocket detection hole</li>
    <li>A<sub>0</sub> and B<sub>0</sub> measured 0.3 mm above bottom of pocket.</li>
    <li>Reference EIA 481.</li>
</ul>
</html>

Hm, reporting might be re-escaping the HTML at some point - or has a problem with the slash in the closing tag. Do you get the same result if you use // in the database, or add a newline (not a <br>) after the </sub>?

For a workaround, if the subscripts are always numeric, you could try parsing your HTML and replacing it with literal substring characters: https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts#Superscripts_and_subscripts_block

If you’ve always got fairly simple input, then it’d be within the domain of a regex (insert standard caveat about parsing HTML with a regular expression here).

Yes, something in reports doing weird escaping… when I // I get below. Also tried a new line and no change…

image

I just tried the Unicode U+2080, but that doesn’t want to render in the font, so would need to play with fonts to get that to work. :frowning:

What about &#x2080; (₀)? Same rendering behavior?

Woo hoo!

image

<html>
<ul>
    <li>Pocket centerlines to cavity center, not to pocket detection hole</li>
    <li>A&#x2080; and B&#x2080; measured 0.3 mm above bottom of pocket.</li>
    <li>Reference EIA 481.</li>
</ul>
</html>
2 Likes