 
     # Check for cover image
     if @logoElem
-      image = "<img src='#{@options.podcastCover}' alt='Logo of #{@options.podcastTitle}'>"
-      @logoElem.innerHtml = image
+      image = document.createElement('img')
+      image.src = @options.podcastCover
+      image.alt = "Logo of #{@options.podcastTitle}"
+      @logoElem.appendChild(image)
       @logoElem.addEventListener 'click', (event) =>
         window.parent.postMessage("clicked_#{@options.id}", '*')
 

      @elem.offsetWidth

    if @logoElem
      img = @logoElem.find('img')

      showImage = =>
        @logoElem.height(width)
        height += width
        @logoElem.show()
        resize(height, width)

      unless img[0].complete
        img.addEventListener 'load', showImage
      else
        showImage()


  render: () ->
    # Add size classes
    sizeOptions = @options.size.replace('%20', ' ').split(' ')
    sizeOptions.forEach (sizeOption) =>
      @elem.classList.add(sizeOption)

    # Add title attritbute to button element
    @elem.setAttribute('title', @I18n.t('button'))
