feat(normalsub): Implement flexible, path-based subscription URLs
Refactors the NormalSub feature to move away from a hardcoded `/sub/normal/` path and a restrictive single-word subpath. This change introduces support for multi-segment, slash-separated subpaths (e.g., `path/to/resource`), providing greater flexibility for creating descriptive and structured subscription URLs.
This commit is contained in:
@ -88,7 +88,8 @@ $(document).ready(function () {
|
||||
|
||||
function isValidSubPath(subpath) {
|
||||
if (!subpath) return false;
|
||||
return /^[a-zA-Z0-9]+$/.test(subpath);
|
||||
const subpathRegex = /^[a-zA-Z0-9]+(?:\/[a-zA-Z0-9]+)*$/;
|
||||
return subpathRegex.test(subpath);
|
||||
}
|
||||
|
||||
function isValidIPorDomain(input) {
|
||||
|
||||
Reference in New Issue
Block a user