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
|
# 2.0.0-alpha.22
|
||||||
* Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
|
* Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
|
||||||
* This allows routes to know where in the resolution process they exist, at runtime.
|
* 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.
|
/// Renders a view to the response stream, and closes the response.
|
||||||
Future render(String view, [Map<String, dynamic> data]) {
|
Future render(String view, [Map<String, dynamic> data]) {
|
||||||
if (!isOpen) throw closed();
|
if (!isOpen) throw closed();
|
||||||
contentType = new MediaType('text', 'html');
|
contentType = new MediaType('text', 'html', {'charset': 'utf-8'});
|
||||||
return Future<String>.sync(() => app.viewGenerator(
|
return Future<String>.sync(() => app.viewGenerator(
|
||||||
view,
|
view,
|
||||||
new Map<String, dynamic>.from(renderParams)
|
new Map<String, dynamic>.from(renderParams)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_framework
|
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.
|
description: A high-powered HTTP server with dependency injection, routing and much more.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/angel_framework
|
homepage: https://github.com/angel-dart/angel_framework
|
||||||
|
|
Loading…
Reference in a new issue