oembetter
Advanced tools
Comparing version 0.1.20 to 0.1.22
@@ -88,3 +88,5 @@ var request = require('request'); | ||
if (options) { | ||
var parsed = urls.parse(oUrl); | ||
// make sure parsed.query is an object by passing true as | ||
// second argument | ||
var parsed = urls.parse(oUrl, true); | ||
var keys = Object.keys(options); | ||
@@ -97,2 +99,6 @@ if (!parsed.query) { | ||
}); | ||
// Clean up things url.format defaults to if they are already there, | ||
// ensuring that parsed.query is actually used | ||
delete parsed.href; | ||
delete parsed.search; | ||
oUrl = urls.format(parsed); | ||
@@ -99,0 +105,0 @@ } |
{ | ||
"name": "oembetter", | ||
"version": "0.1.20", | ||
"version": "0.1.22", | ||
"description": "A modern oembed client. Allows you to register filters to improve or supply oembed support for sites that don't normally have it. You can also supply a whitelist of services you trust to prevent XSS attacks.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# oembetter | ||
<a href="http://apostrophenow.org/"><img src="https://raw.github.com/punkave/oembetter/master/logos/logo-box-madefor.png" align="right" /></a> | ||
<a href="https://apostrophecms.org/"><img src="https://raw.github.com/punkave/oembetter/master/logos/logo-box-madefor.png" align="right" /></a> | ||
@@ -39,3 +39,3 @@ `oembetter` is a modern [oembed](http://oembed.com) client which allows you to add filters that provide or improve oembed support for services that either don't have it or don't do it very well. | ||
oembetter.fetch(url, function(err, { maxwidth: 480, maxheight: 480 }, response) { | ||
oembetter.fetch(url, { maxwidth: 480, maxheight: 480 }, function(err, response) { | ||
if (!err) { | ||
@@ -189,2 +189,6 @@ // response.html contains markup to embed the video or | ||
0.1.22: fixed URL parsing bugs impacting use of preconfigured endpoints that already contain some query string parameters. | ||
0.1.21: Updated links and information in the README. | ||
0.1.20: fixed a nuisance error that was appearing when Facebook was present but `window` was not the default object. | ||
@@ -226,4 +230,4 @@ | ||
## About P'unk Avenue and Apostrophe | ||
## About P'unk Avenue and ApostropheCMS | ||
`oembetter` was created at [P'unk Avenue](http://punkave.com) for use in many projects built with Apostrophe, an open-source content management system built on node.js. `oembetter` isn't mandatory for Apostrophe and vice versa, but they play very well together. If you like `oembetter` you should definitely [check out apostrophenow.org](http://apostrophenow.org). | ||
`oembetter` was created at [P'unk Avenue](http://punkave.com) for use in many projects built with ApostropheCMS, an open-source content management system built on node.js. `oembetter` isn't mandatory for Apostrophe and vice versa, but they play very well together. If you like `oembetter` you should definitely [check out apostrophecms.org](https://apostrophecms.org/). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
34454
1115
574
0
231