Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oembetter

Package Overview
Dependencies
Maintainers
10
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oembetter - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

7

oembed.js

@@ -61,2 +61,9 @@ var request = require('request');

oUrl = urls.resolve(response.request.href, oUrl);
if (url.match(/^https:/) && oUrl.match(/^http:/)) {
// Fix for YouTube's bug 12/15/20: issuing HTTP discovery URLs
// but flunking them with a 403 when they arrive
if (oUrl.match(/youtube/) && oUrl.match(/^http:/)) {
oUrl = oUrl.replace(/^http:/, 'https:');
}
}
break;

@@ -63,0 +70,0 @@ }

5

package.json
{
"name": "oembetter",
"version": "0.1.22",
"version": "0.1.23",
"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.",

@@ -31,3 +31,6 @@ "main": "index.js",

"xml2js": "^0.4.4"
},
"devDependencies": {
"mocha": "^8.2.1"
}
}

2

README.md

@@ -188,2 +188,4 @@ # oembetter

0.1.23: workaround for YouTube bug in which video pages contain `http:` recommendations for oembed URLs, but an `http:` request is rejected with a 403 error. Force `https:` for YouTube.
0.1.22: fixed URL parsing bugs impacting use of preconfigured endpoints that already contain some query string parameters.

@@ -190,0 +192,0 @@

@@ -77,4 +77,4 @@ var assert = require("assert");

});
it('should return no response gracefully for boutell.com', function(done) {
oembetter.fetch('http://boutell.com/', function(err, response) {
it('should return no response gracefully for apostrophecms.com', function(done) {
oembetter.fetch('http://apostrophecms.com/', function(err, response) {
assert(err);

@@ -194,17 +194,3 @@ return done();

});
it('Taylor Swift video comes through as type video', function(done) {
oembetter.fetch('https://www.facebook.com/TaylorSwift/videos/10153629261480369/', function(err, response) {
assert(!err);
assert(response.type === 'video');
return done();
});
});
it('Zuck photo post comes through as rich', function(done) {
oembetter.fetch('https://www.facebook.com/photo.php?fbid=10103741991850131&set=a.529237706231.2034669.4&type=3&theater', function(err, response) {
assert(!err);
assert(response.type === 'rich');
return done();
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc