Add charset=utf-8 to res.render
This commit is contained in:
parent
ba1ad07c90
commit
4df78749f1
3 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,6 @@
|
|||
# 2.0.0-alpha.23
|
||||
* `ResponseContext.render` sets `charset` to `utf8` in `contentType`.
|
||||
|
||||
# 2.0.0-alpha.22
|
||||
* Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
|
||||
* This allows routes to know where in the resolution process they exist, at runtime.
|
||||
|
|
|
@ -184,7 +184,7 @@ abstract class ResponseContext<RawResponse>
|
|||
/// Renders a view to the response stream, and closes the response.
|
||||
Future render(String view, [Map<String, dynamic> data]) {
|
||||
if (!isOpen) throw closed();
|
||||
contentType = new MediaType('text', 'html');
|
||||
contentType = new MediaType('text', 'html', {'charset': 'utf-8'});
|
||||
return Future<String>.sync(() => app.viewGenerator(
|
||||
view,
|
||||
new Map<String, dynamic>.from(renderParams)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel_framework
|
||||
version: 2.0.0-alpha.22
|
||||
version: 2.0.0-alpha.23
|
||||
description: A high-powered HTTP server with dependency injection, routing and much more.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_framework
|
||||
|
@ -30,4 +30,4 @@ dependencies:
|
|||
dev_dependencies:
|
||||
http: ^0.11.3
|
||||
io: ^0.3.0
|
||||
test: ^1.0.0
|
||||
test: ^1.0.0
|
||||
|
|
Loading…
Reference in a new issue