Another, related topic would be: Replacement of HTML entities, e.g. convert a string such as 'cm<sup>2<M/sup>' to 'cm<sup>2</sup>', or 'sin α + cos β' to the one with the correct greek symbols (utf8). I have a solution in TAChart, unit TAHtml, but maybe (probably...) there's a better one.