Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Escape hyphen in username pattern for Chrome unicodeSets compatibility

LearningCircuit826a8ad73291
diff --git a/src/local_deep_research/web/templates/auth/register.html b/src/local_deep_research/web/templates/auth/register.html
index 691f7a4865..000d2983cb 100644
--- a/src/local_deep_research/web/templates/auth/register.html
+++ b/src/local_deep_research/web/templates/auth/register.html
@@ -406,6 +406,9 @@
<div class="form-group">
<label for="username">Username</label>
+ <!-- Note: The hyphen in the pattern must be escaped (\-) for Chrome's
+ unicodeSets (v) flag regex validation. Without escaping, Chrome
+ reports: "Invalid regular expression: Invalid character in character class" -->
<input type="text"
class="ldr-form-control"
id="username"
@@ -415,7 +418,7 @@
required
autofocus
minlength="3"
- pattern="[a-zA-Z0-9_-]+">
+ pattern="[a-zA-Z0-9_\-]+">
<small>Letters, numbers, underscores, and hyphens only</small>
</div>
diff --git a/tests/ui_tests/test_register_validation.js b/tests/ui_tests/test_register_validation.js
index 6b1daf2c08..9d75090b50 100644
--- a/tests/ui_tests/test_register_validation.js
+++ b/tests/ui_tests/test_register_validation.js
@@ -205,7 +205,7 @@ async function testRegisterValidation() {
console.log('\n📋 Test 7: Pattern attribute verification');
const patternAttr = await page.evaluate(el => el.pattern, usernameInput);
- const expectedPattern = '[a-zA-Z0-9_-]+';
+ const expectedPattern = '[a-zA-Z0-9_\\-]+';
console.log(` Pattern attribute: "${patternAttr}"`);
console.log(` Expected pattern: "${expectedPattern}"`);