From 0af72245b8a2292c53fddfb6adb9ccb19dadf9c7 Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Thu, 19 Dec 2019 23:14:55 +0000 Subject: [PATCH] test(open_graph): encodeURL link --- test/scripts/helpers/open_graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', () => {