Use geo/address only if no containing links

This commit is contained in:
M66B 2023-08-06 10:40:52 +02:00
parent f3597b6c61
commit 33c8576a84
1 changed files with 3 additions and 2 deletions

View File

@ -1103,8 +1103,9 @@ public class HtmlHelper {
// Replace addresses by link // Replace addresses by link
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address
for (Element address : document.select("address")) for (Element address : document.select("address"))
address.tagName("a") if (address.select("a").size() == 0)
.attr("href", "geo:0,0?q=" + Uri.encode(address.text())); address.tagName("a")
.attr("href", "geo:0,0?q=" + Uri.encode(address.text()));
// Paragraphs // Paragraphs
for (Element p : document.select("p")) { for (Element p : document.select("p")) {