mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge branch 'master' into dashboard3
* master: Add XML declaration to OPML output (sets utf-8) Export OPML files as .opml
This commit is contained in:
commit
9c8ee66a92
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ class OPMLExporter(Importer):
|
|||
folders = self.get_folders()
|
||||
body = SubElement(root, 'body')
|
||||
self.process_outline(body, folders, verbose=verbose)
|
||||
return tostring(root)
|
||||
return tostring(root, encoding='utf8', method='xml')
|
||||
|
||||
def process_outline(self, body, folders, verbose=False):
|
||||
for obj in folders:
|
||||
|
|
|
@ -79,8 +79,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')
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue