Changeset 112:fce60c5487d3
- Timestamp:
- 2007-08-01 18:14:09
(1 year ago)
- Author:
- Stefan Schwarzer <sschwarzer@sschwarzer.net>
- branch:
- default
- Message:
Fixed now-redundant quoting in `image_to_html`.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r107 |
r112 |
|
| 180 | 180 | path = os.path.abspath(os.readlink(path)) |
|---|
| 181 | 181 | lexer = pygments_finder.lexers.guess_lexer_for_filename(path, text) |
|---|
| 182 | | except lexers.ClassNotFound: |
|---|
| | 182 | except pygments_finder.lexers.ClassNotFound: |
|---|
| 183 | 183 | # files with many extensions are actually XML files, so |
|---|
| 184 | 184 | # test explicitly for them |
|---|
| … | … | |
| 196 | 196 | which can be found under the absolute `url`. |
|---|
| 197 | 197 | """ |
|---|
| 198 | | image_source = "/%s/raw_data?url=%s" % (config.SPECIAL_DIR, |
|---|
| 199 | | urllib.quote(url)) |
|---|
| | 198 | image_source = "/%s/raw_data?url=%s" % (config.SPECIAL_DIR, url) |
|---|
| 200 | 199 | return u'<img src="%s" />' % image_source |
|---|
| 201 | 200 | |
|---|
| … | … | |
| 218 | 217 | hexa = "%s %s" % (hexa[:23], hexa[23:]) |
|---|
| 219 | 218 | printable = s.translate(filter_) |
|---|
| 220 | | result.append("%08X %-*s %s\n" % (i, length*3, hexa, |
|---|
| 221 | | printable)) |
|---|
| | 219 | result.append("%08X %-*s |%s|\n" % (i, length*3, hexa, |
|---|
| | 220 | printable)) |
|---|
| 222 | 221 | return dumb_text_to_html(''.join(result)) |
|---|
| 223 | 222 | |
|---|