Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ const MAX_PROFILE_NAME_LENGTH = 64;
const SAFE_PROFILE_NAME_RE = /^[A-Za-z0-9 _\-()À-ɏ]{1,64}$/;

function isValidProfileName(name) {
if (typeof name !== "string" || name.trim() === "") return false;
if (typeof name !== "string" || name.trim().length === 0) return false;
if (RESERVED_PROFILE_NAMES.has(name)) return false;
return SAFE_PROFILE_NAME_RE.test(name);
}
Expand Down Expand Up @@ -1065,7 +1065,7 @@ function getThemeProfiles() {
const ALLOWED_EXTERNAL_SCHEMES = new Set(["https:", "http:"]);

function openExternalUrl(url) {
if (typeof url !== "string" || url.trim() === "") {
if (typeof url !== "string" || url.trim().length === 0) {
console.warn("[Paraline] openExternalUrl(): invalid url payload:", url);
return;
}
Expand Down