mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-17 02:49:04 +02:00
Report charset for text & CSV views
I noticed in the branch comparison plain text view ("Plain text" button in the Tools -> Branch Comparison page) that in current versions of Firefox the ellipses were coming through corrupted, though they looked fine in the HTML version, and it turns out this is because I wasn't specifying a character set encoding. It should be UTF-8, so add a charset to the content type stating as such for this and other similar views. Signed-off-by: Paul Eggleton <paul.eggleton@linux.microsoft.com>
This commit is contained in:
parent
308805f04a
commit
ccc1fa775b
|
@ -157,7 +157,7 @@ urlpatterns = [
|
|||
ClassicRecipeSearchView.as_view(
|
||||
template_name='layerindex/classicrecipes_csv.txt',
|
||||
paginate_by=0,
|
||||
content_type='text/csv'),
|
||||
content_type='text/csv; charset=utf-8'),
|
||||
name='comparison_recipe_search_csv'),
|
||||
url(r'^comparison/stats/(?P<branch>[-.\w]+)/$',
|
||||
ClassicRecipeStatsView.as_view(
|
||||
|
@ -194,7 +194,7 @@ urlpatterns = [
|
|||
name='branch_comparison'),
|
||||
url(r'^branch_comparison_plain/$',
|
||||
BranchCompareView.as_view(
|
||||
content_type='text/plain',
|
||||
content_type='text/plain; charset=utf-8',
|
||||
template_name='layerindex/branchcompare_plain.txt'),
|
||||
name='branch_comparison_plain'),
|
||||
url(r'^recipe_deps/$',
|
||||
|
|
|
@ -1493,7 +1493,7 @@ def layer_export_recipes_csv_view(request, branch, slug):
|
|||
if not layerbranch:
|
||||
raise Http404
|
||||
|
||||
response = HttpResponse(content_type='text/csv')
|
||||
response = HttpResponse(content_type='text/csv; charset=utf-8')
|
||||
response['Content-Disposition'] = 'attachment; filename="recipes_%s_%s.csv"' % (layer.name, layerbranch.branch.name)
|
||||
|
||||
fieldlist = request.GET.get('fields', 'pn,pv,license').split(',')
|
||||
|
|
|
@ -607,7 +607,7 @@ def recipes_report(request, maintplan_name, release_name, milestone_name):
|
|||
|
||||
recipe_list = _get_recipe_list(milestone)
|
||||
|
||||
response = HttpResponse(content_type='text/csv')
|
||||
response = HttpResponse(content_type='text/csv; charset=utf-8')
|
||||
response['Content-Disposition'] = 'attachment; filename="%s_%s.csv"' % (
|
||||
release_name , milestone_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user