From 2e5c8b87d7bc6a3bc0aae10411fbf573bb0a7810 Mon Sep 17 00:00:00 2001 From: Carlgo11 Date: Thu, 19 Dec 2024 03:45:14 +0100 Subject: [PATCH] Replace \n with %0A --- src/tests/Facebook.js | 2 +- src/tests/SimilarWeb.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/Facebook.js b/src/tests/Facebook.js index 126703e..402592d 100644 --- a/src/tests/Facebook.js +++ b/src/tests/Facebook.js @@ -10,6 +10,6 @@ export default async function Facebook(handle) { throw { title: 'Facebook handle not found', - message: `Failed to find the Facebook page https://facebook.com/${handle}\\nThe page might be private or not exist.` + message: `Failed to find the Facebook page https://facebook.com/${handle}%0AThe page might be private or not exist.` }; } diff --git a/src/tests/SimilarWeb.js b/src/tests/SimilarWeb.js index 1dda025..3db918f 100644 --- a/src/tests/SimilarWeb.js +++ b/src/tests/SimilarWeb.js @@ -27,24 +27,24 @@ export default async function(fqdn, env) { case 403: throw { title: 'Manual review required', - message: 'Monthly API limit reached.\\nPlease wait for a maintainer to review your pull request.\\nhttps://www.similarweb.com/website/${domain}' + message: 'Monthly API limit reached.%0APlease wait for a maintainer to review your pull request.%0Ahttps://www.similarweb.com/website/${domain}' }; case 404: throw { title: `${domain} is unranked`, - message: `${domain} lacks a SimilarWeb rank.\\nIf this domain is an additional domain, this warning can be ignored` + message: `${domain} lacks a SimilarWeb rank.%0AIf this domain is an additional domain, this warning can be ignored` }; case 429: throw { title: 'Manual review required', - message: `Rate limit exceeded for SimilarWeb API while fetching ${domain} rank.\\nPlease wait for a maintainer to review your pull request.\\nhttps://www.similarweb.com/website/${domain}` + message: `Rate limit exceeded for SimilarWeb API while fetching ${domain} rank.%0APlease wait for a maintainer to review your pull request.%0Ahttps://www.similarweb.com/website/${domain}` }; case 200: break; default: throw { title: `Failed to review ${domain}`, - message: `Unable to fetch the Similarweb global rank for ${domain}\\nStatus: ${res.statusText} (${res.status})` + message: `Unable to fetch the Similarweb global rank for ${domain}%0AStatus: ${res.statusText} (${res.status})` }; } @@ -53,13 +53,13 @@ export default async function(fqdn, env) { // Soft fail on failure if (json.meta.status !== 'Success') throw { title: `Failed to review ${domain}`, - message: 'Unable to parse message from Similarweb API\\nPlease wait for a maintainer to review your pull request.\\nhttps://www.similarweb.com/website/${domain}' + message: 'Unable to parse message from Similarweb API%0APlease wait for a maintainer to review your pull request.%0Ahttps://www.similarweb.com/website/${domain}' }; if (!Object.keys(json).includes('similar_rank')) { throw { title: `${domain} is unranked`, - message: `${domain} lacks a Similarweb rank.\\nIf this domain is an additional domain, this warning can be ignored` + message: `${domain} lacks a Similarweb rank.%0AIf this domain is an additional domain, this warning can be ignored` }; }