cssrshinyrsconnect

RStudio Connect pastes CSS in cell on update


I am making an application regarding holiday requests. The frontpage of the app looks as follows:

enter image description here

As you can see in the bottom right there is a column called "Accepted?" which either shows "OK" or "DENIED" in a corresponding color. When I would accept the request it will show the following:

enter image description here

As you can see the CSS is pasted without actually formatting the text within. This does not happen when I run the application locally, only on the server. Once I reload the page it will show correctly again:

enter image description here

What exactly causes this issue? Is there a way to solve it?


Solution

  • If you're using renderTable try adding sanitize.text.function to it

    output$table1<- renderTable({
       data()
    }, sanitize.text.function = function(x) x)