Add special character encoding to external links
This commit is contained in:
parent
6e717a8cf7
commit
5f5c250272
@ -278,7 +278,10 @@ struct PageContentGenerator {
|
|||||||
results.warning("Invalid external link definition", source: page.path)
|
results.warning("Invalid external link definition", source: page.path)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
let url = parts[0].trimmed
|
guard let url = parts[0].trimmed.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
||||||
|
results.warning("Invalid external link \(parts[0].trimmed)", source: page.path)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
let title = parts[1].trimmed
|
let title = parts[1].trimmed
|
||||||
|
|
||||||
return (url, title)
|
return (url, title)
|
||||||
|
Loading…
Reference in New Issue
Block a user