Export OPML files as .opml

This commit is contained in:
Daniel Aleksandersen 2021-04-01 05:11:54 +02:00 committed by GitHub
parent 1e470a828e
commit 2324d21f39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,8 +78,8 @@ def opml_export(request):
exporter = OPMLExporter(user)
opml = exporter.process()
response = HttpResponse(opml, content_type='text/xml')
response['Content-Disposition'] = 'attachment; filename=NewsBlur-%s-%s' % (
response = HttpResponse(opml, content_type='text/xml; charset=utf-8')
response['Content-Disposition'] = 'attachment; filename=NewsBlur-%s-%s.opml' % (
user.username,
now.strftime('%Y-%m-%d')
)