From b996eadbd44e0387a2ba7a1ef75dfe464f173e6e Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 4 Jul 2022 16:09:09 +0200 Subject: [PATCH] Renamed sodo search identification attribute refs https://github.com/TryGhost/Team/issues/1665 - The search script should be uniquiely identifiable in DOM. Previously element for portal scipt element and search element both had `data-ghost` attributes` for identification. Having `data-sodo-search` makes naming unique --- core/frontend/helpers/ghost_head.js | 2 +- test/unit/frontend/helpers/ghost_head.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/frontend/helpers/ghost_head.js b/core/frontend/helpers/ghost_head.js index fa909f0648..ffb2a42fd9 100644 --- a/core/frontend/helpers/ghost_head.js +++ b/core/frontend/helpers/ghost_head.js @@ -62,7 +62,7 @@ function getSearchHelper(frontendKey) { return ''; } - let helper = ``; + let helper = ``; return helper; } diff --git a/test/unit/frontend/helpers/ghost_head.test.js b/test/unit/frontend/helpers/ghost_head.test.js index de2c8b5411..63c06bd573 100644 --- a/test/unit/frontend/helpers/ghost_head.test.js +++ b/test/unit/frontend/helpers/ghost_head.test.js @@ -1739,7 +1739,7 @@ describe('{{ghost_head}} helper', function () { describe('search scripts', function () { it('includes search when labs flag enabled', function (done) { - labsStub = sinon.stub(labs, 'isSet').returns(true); + sinon.stub(labs, 'isSet').returns(true); ghost_head(testUtils.createHbsResponse({ locals: { @@ -1750,7 +1750,7 @@ describe('{{ghost_head}} helper', function () { })).then(function (rendered) { should.exist(rendered); rendered.string.should.containEql('