Skip to content

Commit

Permalink
stricter globs
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Dec 17, 2023
1 parent c5e3d6a commit 5a95bc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion events.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ id("search").addEventListener("input", function() {
createHTMLElement("a", {"href": "?q=" + encodeURIComponent(getConflictRegex(q)) + "&regex=tight"}, ["↑ find potential gismu conflicts?"])
]));
}
if (/[CV*?(|)]/.test(q)) {
if (/^[CV*?(|)a-pr-vx-z' ]+$/.test(q)) {
try {
_ = new RegExp(
`^${h(q).replace(/C/g, "[bcdfgjklmnprstvxz]").replace(/V/g, "[aeiou]").replace(/\?/g, ".").replace(/\*+/g, ".*")}$`, "i"
Expand Down
2 changes: 1 addition & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function search(query) {
results.push([entry, 1]);
}
}
} else if (/[CV*?(|)]/.test(original)) {
} else if (/^[CV*?(|)a-pr-vx-z' ]+$/.test(original)) {
// also stolen from lynn of lidysisku etc fame
var rgx;
try {
Expand Down

0 comments on commit 5a95bc3

Please sign in to comment.