Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Force utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Jul 17, 2014
1 parent eeb8433 commit 23f18ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Node oEmbed proxy that supports a few other non-oEmbed services and JSONP", "description": "Node oEmbed proxy that supports a few other non-oEmbed services and JSONP",
"keywords": ["oembed", "media", "proxy", "thumbnails"], "keywords": ["oembed", "media", "proxy", "thumbnails"],
"author": "amix", "author": "amix",
"version": "1.4.6", "version": "1.4.7",
"repository": "https://github.com/Doist/media-embed-server", "repository": "https://github.com/Doist/media-embed-server",
"licenses": [{ "licenses": [{
"type": "MIT", "type": "MIT",
Expand All @@ -12,7 +12,7 @@


"dependencies": { "dependencies": {
"media-parser": "1.4.4", "media-parser": "1.4.4",
"webpage-info": "0.0.2", "webpage-info": "0.0.3",
"express": "4.0.0", "express": "4.0.0",
"commander": ">=0.6.0", "commander": ">=0.6.0",
"async": ">=0.7.0", "async": ">=0.7.0",
Expand Down
8 changes: 4 additions & 4 deletions src/media-embed-server.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ app.get('/parse', (req, res) ->
json = JSON.stringify(cb_results) json = JSON.stringify(cb_results)


if callback if callback
res.set({'Content-Type': 'text/javascript'}) res.set({'Content-Type': 'text/javascript; charset=utf-8'})
res.send(callback + "(" + json + ")") res.send(callback + "(" + json.toString('utf8') + ")")
else else
res.set({'Content-Type': 'application/json'}) res.set({'Content-Type': 'application/json; charset=utf-8'})
res.send(json) res.send(json.toString('utf8'))
) )
) )


Expand Down

0 comments on commit 23f18ac

Please sign in to comment.