diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json
index d760df97..5dc2839d 100644
--- a/l10n/bundle.l10n.json
+++ b/l10n/bundle.l10n.json
@@ -114,6 +114,7 @@
"Choose page template": "Choose page template",
"Choose parent page": "Choose parent page",
"Please enter a name for the webpage.": "Please enter a name for the webpage.",
+ "Webpage names should contain only letters, numbers, hyphens, or underscores.": "Webpage names should contain only letters, numbers, hyphens, or underscores.",
"A webpage with the same name already exists. Please enter a different name.": "A webpage with the same name already exists. Please enter a different name.",
"No parent pages found for adding webfile": "No parent pages found for adding webfile",
"File(s) already exist. No new files to add": "File(s) already exist. No new files to add",
diff --git a/loc/translations-export/vscode-powerplatform.xlf b/loc/translations-export/vscode-powerplatform.xlf
index 1aa26f8c..ff0c8584 100644
--- a/loc/translations-export/vscode-powerplatform.xlf
+++ b/loc/translations-export/vscode-powerplatform.xlf
@@ -375,6 +375,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)
+
+
+
diff --git a/src/client/power-pages/create/Webpage.ts b/src/client/power-pages/create/Webpage.ts
index 642c3b2e..e385bbbf 100644
--- a/src/client/power-pages/create/Webpage.ts
+++ b/src/client/power-pages/create/Webpage.ts
@@ -185,6 +185,9 @@ async function getWebpageInputs(
if (!name) {
return vscode.l10n.t("Please enter a name for the webpage.");
}
+ if (!/^[A-Za-z0-9-_]+$/.test(name)) {
+ return vscode.l10n.t("Webpage names should contain only letters, numbers, hyphens, or underscores.");
+ }
if (
webpageNames
.map((n) => n.toLowerCase())