Return the HTML code for the table cell with the image.
(self)
| 114 | self.height = height |
| 115 | |
| 116 | def __str__(self): |
| 117 | """Return the HTML code for the table cell with the image.""" |
| 118 | safe_filename = quote(self.image_file) |
| 119 | output = '<a href="%s" target="_blank">' % (safe_filename) |
| 120 | output += '<img src="%s"' % (safe_filename) |
| 121 | if self.height: |
| 122 | output += ' height="%s"' % (self.height) |
| 123 | if self.width: |
| 124 | output += ' width="%s"' % (self.width) |
| 125 | output += "></a>" |
| 126 | |
| 127 | return output |
| 128 | |
| 129 | |
| 130 | class SimpleTableRow: |