title: Embedding an image in a table cell using DT, R and Shiny not working
body: <p>This question was asked <a href="https://stackoverflow.com/questions/30671958/how-to-embed-an-image-in-a-cell-a-table-using-dt-r-and-shiny">here</a> and it was answered. However, now, it is not working for me. I am not sure if there is any changes in the package. Any ideas?</p>
  
  <h2>ui.r</h2>
  
  <pre><code>require(shiny)
  library(DT)
  
   shinyUI(
    DT::dataTableOutput('mytable')
   )
  </code></pre>
  
  <h2>server.R</h2>
  
  <pre><code>library(shiny)
  library(DT)
  
  
  dat &lt;- data.frame(
      country = c('USA', 'China'),
      flag = c('&lt;img src="http://flaglane.com/download/american-flag/american-
              flag-large.png" height="52"&gt;&lt;/img&gt;',
              '&lt;img src="https://upload.wikimedia.org/wikipedia/commons/2/2e/Flag_of_China.png" height="52"&gt;&lt;/img&gt;'
   )
   )
  
    shinyServer(function(input, output){
     output$mytable &lt;- DT::renderDataTable({
  
      DT::datatable(dat, escape = FALSE)
    })
  })
  </code></pre>
  
  <h2>Edits</h2>
  
  <p>My feeling was if it does not work in the Rstudio viewer, it would not work when I launch Shiny. However, I was wrong. When I run the app it works fine but in Rstudio Viewer, it does not.</p>
  
  <pre><code>library(shiny)
  library(DT)
  
  
    dat &lt;- data.frame(
    country = c('USA', 'China'),
  
    flag = c('&lt;img src="http://flaglane.com/download/american-flag/american-
      flag-large.png" height="52"&gt;&lt;/img&gt;',
         '&lt;img src="https://upload.wikimedia.org/wikipedia/commons/2/2e/Flag_of_China.png" height="52"&gt;&lt;/img&gt;'
    )
     )
  DT::datatable(dat, escape = FALSE)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zdeP8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zdeP8.png" alt="enter image description here"></a></p>