From ceb3df2fdb2898c3b15fe2e84c715ea4d7f43fc2 Mon Sep 17 00:00:00 2001
From: ewin <git@ewin.moe>
Date: Thu, 3 Apr 2025 08:28:09 -0400
Subject: [PATCH] Also handle problematic hyphens

---
 src/lodestone.mjs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lodestone.mjs b/src/lodestone.mjs
index 9c1257d..2fa4bf2 100644
--- a/src/lodestone.mjs
+++ b/src/lodestone.mjs
@@ -22,7 +22,7 @@ const itemLinkRegExp = name => new RegExp(`<a href="/lodestone/playguide/db/item
  */
 export async function findItemEDBID (name) {
 	// execute a search for the item's name
-	const searchURL = `https://na.finalfantasyxiv.com/lodestone/playguide/db/item/?q=${encodeURIComponent(name.replace(/\([^)]+\)|&/g, ' '))}`;
+	const searchURL = `https://na.finalfantasyxiv.com/lodestone/playguide/db/item/?q=${encodeURIComponent(name.replace(/\([^)]+\)|[&-]/g, ' '))}`;
 	const response = await fetch(searchURL);
 	const body = await response.text();
 	// find an `<a>` in the HTML response whose text exactly matches the name