From ec3d0b27cd0c7ce591072db33c26777b6d3f37a6 Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 4 Jul 2022 16:46:27 +0200 Subject: [PATCH] Fixed search script element detection refs https://github.com/TryGhost/Team/issues/1665 refs https://github.com/TryGhost/Ghost/commit/b996eadbd44e0387a2ba7a1ef75dfe464f173e6e - The search script injected by Ghost will be identified by `data-sodo-search` data attribute. --- ghost/sodo-search/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/sodo-search/src/index.js b/ghost/sodo-search/src/index.js index 7f3ae493bc..f3d24a2ffd 100644 --- a/ghost/sodo-search/src/index.js +++ b/ghost/sodo-search/src/index.js @@ -15,9 +15,9 @@ function getSiteData() { /** * @type {HTMLElement} */ - const scriptTag = document.querySelector('script[data-ghost-search]'); + const scriptTag = document.querySelector('script[data-sodo-search]'); if (scriptTag) { - const siteUrl = scriptTag.dataset.ghostSearch; + const siteUrl = scriptTag.dataset.sodoSearch; const apiKey = scriptTag.dataset.key; const apiUrl = scriptTag.dataset.api; return {siteUrl, apiKey, apiUrl};