Modify ↓
Opened 20 years ago
Closed 20 years ago
#1842 closed defect (fixed)
mimetype renderer selection by mimetype fails with charset
| Reported by: | Owned by: | Christopher Lenz | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | version control/browser | Version: | devel |
| Severity: | normal | Keywords: | mimeview php |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
IHTMLPreviewRenderer.get_quality_ratio() takes 1 argument mimetype.
All the implementation of get_quality_ratio() does not consider for charset
attribute in mimetype (specified by svn:mime-type), like: "text/x-rst; charset=Shift_JIS".
As result, expected renderer (i.e. ReStructuredTextRenderer) is not selected.
In case of above, "text/x-rst" should be passed to get_quality_ratio()
instead of "text/x-rst; charset=Shift_JIS".
Here is the simple patch:
--- api.py (revision 2034)
+++ api.py (working copy)
@@ -208,6 +208,7 @@
if filename and not mimetype:
mimetype = get_mimetype(filename)
+ mimetype = mimetype.split(';')[0].strip()
candidates = []
for renderer in self.renderers:
Attachments (0)
Change History (2)
comment:1 by , 20 years ago
| Keywords: | mimeview php added |
|---|---|
| Milestone: | → 0.9 |
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.



Patch applied in [2051]. Thanks!