mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Updated URL editing to not automatically force everything to URLs
refs https://github.com/TryGhost/Team/issues/3433
This commit is contained in:
parent
f5c78221a6
commit
4fd0473f1b
@ -20,6 +20,11 @@ const formatUrl = (value: string, baseUrl: string) => {
|
||||
return {save: url, display: url};
|
||||
}
|
||||
|
||||
// If it doesn't look like a URL, leave it as is rather than assuming it's a pathname etc
|
||||
if (!url.match(/^[a-zA-Z0-9-]+:/) && !url.match(/^(\/|\?)/)) {
|
||||
return {save: url, display: url};
|
||||
}
|
||||
|
||||
let parsedUrl: URL;
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user