Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Force utf8

  • Loading branch information...
commit 23f18ac67ba062a75d0716d736add0cdb0aafd66 1 parent eeb8433
@amix amix authored
Showing with 6 additions and 6 deletions.
  1. +2 −2 package.json
  2. +4 −4 src/media-embed-server.coffee
View
4 package.json
@@ -3,7 +3,7 @@
"description": "Node oEmbed proxy that supports a few other non-oEmbed services and JSONP",
"keywords": ["oembed", "media", "proxy", "thumbnails"],
"author": "amix",
- "version": "1.4.6",
+ "version": "1.4.7",
"repository": "https://github.com/Doist/media-embed-server",
"licenses": [{
"type": "MIT",
@@ -12,7 +12,7 @@
"dependencies": {
"media-parser": "1.4.4",
- "webpage-info": "0.0.2",
+ "webpage-info": "0.0.3",
"express": "4.0.0",
"commander": ">=0.6.0",
"async": ">=0.7.0",
View
8 src/media-embed-server.coffee
@@ -69,11 +69,11 @@ app.get('/parse', (req, res) ->
json = JSON.stringify(cb_results)
if callback
- res.set({'Content-Type': 'text/javascript'})
- res.send(callback + "(" + json + ")")
+ res.set({'Content-Type': 'text/javascript; charset=utf-8'})
+ res.send(callback + "(" + json.toString('utf8') + ")")
else
- res.set({'Content-Type': 'application/json'})
- res.send(json)
+ res.set({'Content-Type': 'application/json; charset=utf-8'})
+ res.send(json.toString('utf8'))
)
)
Please sign in to comment.
Something went wrong with that request. Please try again.