                 if x != -1
                     th = document.createElement("th")
                     th.className = "pvtRowLabel"
-                    th.innerHTML = txt
+                    th.textContent = txt
                     th.setAttribute("rowspan", x)
                     if parseInt(j) == rowAttrs.length-1 and colAttrs.length !=0
                         th.setAttribute("colspan",2)

                tr.appendChild th
            th = document.createElement("th")
            th.className = "pvtAxisLabel"
            th.innerHTML = c
            tr.appendChild th
            for own i, colKey of colKeys
                x = spanSize(colKeys, parseInt(i), parseInt(j))
                if x != -1
                    th = document.createElement("th")
                    th.className = "pvtColLabel"
                    th.innerHTML = colKey[j]
                    th.setAttribute("colspan", x)
                    if parseInt(j) == colAttrs.length-1 and rowAttrs.length != 0
                        th.setAttribute("rowspan", 2)

        val = totalAggregator.value()
        td = document.createElement("td")
        td.className = "pvtGrandTotal"
        td.textContent = totalAggregator.format(val)
        td.setAttribute("data-value", val)
        tr.appendChild td
        result.appendChild tr
