Skip to content

Commit

Permalink
test(open_graph): encodeURL link
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Dec 19, 2019
1 parent ed78ec5 commit 0af7224
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/scripts/helpers/open_graph.js
Expand Up @@ -2,7 +2,7 @@

const moment = require('moment');
const cheerio = require('cheerio');
const { escapeHTML } = require('hexo-util');
const { encodeURL } = require('hexo-util');

describe('open_graph', () => {
const Hexo = require('../../../lib/hexo');
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('open_graph', () => {

const result = openGraph.call(ctx);

result.should.contain(meta({property: 'og:url', content: escapeHTML(ctx.url)}));
result.should.contain(meta({property: 'og:url', content: encodeURL(ctx.url)}));
});

it('images - content', () => {
Expand Down

0 comments on commit 0af7224

Please sign in to comment.