diff --git a/test/scripts/helpers/open_graph.js b/test/scripts/helpers/open_graph.js index b6f88cba3e..8eace68ef0 100644 --- a/test/scripts/helpers/open_graph.js +++ b/test/scripts/helpers/open_graph.js @@ -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'); @@ -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', () => {