Change URL scheme fallback from https to http
Manufacturer product pages are often not on secure connections; http:// is the safer default to avoid connection failures on non-SSL sites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
string SafeUrl(string? url) =>
|
string SafeUrl(string? url) =>
|
||||||
string.IsNullOrEmpty(url) ? "#"
|
string.IsNullOrEmpty(url) ? "#"
|
||||||
: (url.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || url.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
|
: (url.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || url.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
|
||||||
? url : "https://" + url;
|
? url : "http://" + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@section Styles {
|
@section Styles {
|
||||||
|
|||||||
@@ -415,7 +415,7 @@
|
|||||||
|
|
||||||
function ensureAbsoluteUrl(url) {
|
function ensureAbsoluteUrl(url) {
|
||||||
if (!url) return url;
|
if (!url) return url;
|
||||||
return /^https?:\/\//i.test(url) ? url : 'https://' + url;
|
return /^https?:\/\//i.test(url) ? url : 'http://' + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncLinkButton(inputId, linkId, url) {
|
function syncLinkButton(inputId, linkId, url) {
|
||||||
|
|||||||
@@ -552,7 +552,7 @@
|
|||||||
|
|
||||||
function ensureAbsoluteUrl(url) {
|
function ensureAbsoluteUrl(url) {
|
||||||
if (!url) return url;
|
if (!url) return url;
|
||||||
return /^https?:\/\//i.test(url) ? url : 'https://' + url;
|
return /^https?:\/\//i.test(url) ? url : 'http://' + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncLink(inputId, linkId, url) {
|
function syncLink(inputId, linkId, url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user