don't make non-url uris into invalid links

This commit is contained in:
Grahame Grieve 2020-12-17 13:05:50 +11:00
parent ff49147146
commit 40642c2263
1 changed files with 3 additions and 1 deletions

View File

@ -400,8 +400,10 @@ public class DataRenderer extends Renderer {
} else {
if (uri.getValue().contains("|")) {
x.ah(uri.getValue().substring(0, uri.getValue().indexOf("|"))).addText(uri.getValue());
} else {
} else if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("ftp:")) {
x.ah(uri.getValue()).addText(uri.getValue());
} else {
x.code().addText(uri.getValue());
}
}
}