HTML table output in SSJS

v6.79

I’ve got some SSJS which processes form data and should present it in a HTML table.

When I concatenate the string with form data (using template literals in JS), SSJS only outputs what would be each tables cell’s contents - ‘Monday’ or ‘Tuesday’ for example with no HTML.

When I switch to using an unordered list (for example), SSJS outputs it correctly - as an unordered list.

I’ve tried removing print(X) from the .js file, into the body of the page but that doesn’t make any difference.

Any ideas? Seems to only affect HTML tables!

Can you paste a minimal SSJS example showing how you build the HTML string and where/how it’s printed?
Without seeing the exact output context, it’s hard to troubleshoot — tables are often stripped or re-parented in Matrix depending on where they’re rendered, even when lists work.