Can Javascript DataTables show raw/literal strings instead of interpretting escape characters?

I’ve built a Flask app that displays text data from CSV files uploaded by the user in a DataTable. Occasionally a text might include escape characters or even a bit of code/tags. I want all text to display exactly as it was written in the original file, including any escape characters or other code/tags. For reasons I don’t need to get into, solutions involving replacing characters within the text itself will not work for my use case (so an extra backslash or ascii character or something is unacceptable).

Is there a way to achieve this?

Below is some javascript code I had hoped would work using String.raw, but it still renders “This is <b>bold</b>” as “This is bold“. Not what I expected.

simplified code:

\ the data['table'] JSON object was created in Python with pd.DataFrame.to_dict(orient='records')


function prepareTables(data) {
    
    // build table to show input data
    var data_table = $(`#data-table`).DataTable();
    data_table.clear();

    data['table'].forEach(function(item) {
        //insert rows
        data_table.row.add([
            item.id, String.raw`${item.text}`, item.some_number
        ])
    })
    data_table.draw();