We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f48d47 + 14fc15d commit eb232bbCopy full SHA for eb232bb
Sources/RichTextRenderer/NodeRenderers/Hyperlink/HyperlinkRenderer.swift
@@ -26,9 +26,12 @@ open class HyperlinkRenderer: NodeRendering {
26
result.append(child)
27
}
28
29
+ // Prevent crashes for links with spaces or other special characters
30
+ let encodedURI = node.data.uri.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? node.data.uri
31
+
32
result.addAttributes(
33
[
- .link: node.data.uri,
34
+ .link: encodedURI,
35
],
36
range: result.fullRange
37
)
0 commit comments