summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-12-20 19:54:24 +0000
committerGreg Roach <fisharebest@gmail.com>2013-12-20 19:54:24 +0000
commit5a56e504916a9c2e8078fde68a5ff02b4ff963b6 (patch)
treeed2aa94e5e68637ead0bb1ffa430e19c52fea8d7
parent9d43aca4b5cd8c8a1d60867a096d89f604b5c67a (diff)
downloadwebtrees-5a56e504916a9c2e8078fde68a5ff02b4ff963b6.tar.gz
webtrees-5a56e504916a9c2e8078fde68a5ff02b4ff963b6.tar.bz2
webtrees-5a56e504916a9c2e8078fde68a5ff02b4ff963b6.zip
#1262546 - WWW & URL tag clickability
-rw-r--r--includes/functions/functions_print_facts.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php
index 37a28319cd..be5e8811d1 100644
--- a/includes/functions/functions_print_facts.php
+++ b/includes/functions/functions_print_facts.php
@@ -269,6 +269,7 @@ function print_fact(WT_Fact $fact, WT_GedcomRecord $record) {
}
break;
case 'URL':
+ case '_URL':
case 'WWW':
echo '<div class="field"><a href="', WT_Filter::escapeHtml($fact->getValue()), '">', WT_Filter::escapeHtml($fact->getValue()), '</a></div>';
break;
@@ -416,6 +417,12 @@ function print_fact(WT_Fact $fact, WT_GedcomRecord $record) {
echo WT_Gedcom_Tag::getLabelValue('TYPE', WT_Gedcom_Tag::getFileFormTypeValue($type_match[1]));
}
break;
+ case 'URL':
+ case '_URL':
+ case 'WWW':
+ $link = '<a href="' . WT_Filter::escapeHtml($match[2]) . '">' . WT_Filter::escapeHtml($match[2]) . '</a>';
+ echo WT_Gedcom_Tag::getLabelValue($fact->getTag().':'.$match[1], $link);
+ break;
default:
if (!$HIDE_GEDCOM_ERRORS || WT_Gedcom_Tag::isTag($match[1])) {
if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $match[2], $xmatch)) {