Reduce complexity of PMA_getHtmlForTrackingReport().

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>