summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-17 12:43:49 +0200
committerYorhel <git@yorhel.nl>2009-08-17 16:27:17 +0200
commit797b71b677b4c7a348a184eaa8d9faf1b241942d (patch)
treea44202b6d104de2e46c91c4e732880eb938b4e65 /lib
parentf85607dd19757fb77546f05fdd53d408216f1623 (diff)
L10N: Replaced HTML with maketext markup and documented the functions
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/L10N.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VNDB/L10N.pm b/lib/VNDB/L10N.pm
index c8b87711..114d1fc4 100644
--- a/lib/VNDB/L10N.pm
+++ b/lib/VNDB/L10N.pm
@@ -82,6 +82,7 @@ use warnings;
package VNDB::L10N::en;
use base 'VNDB::L10N';
use POSIX 'strftime';
+ use YAWF 'xml_escape';
our %Lexicon;
# Argument: unix timestamp
@@ -154,6 +155,14 @@ use warnings;
shift;
return $_[shift];
}
+
+ # Shortcut for <a href="arg1">arg2</a>
+ sub url {
+ return sprintf '<a href="%s">%s</a>', xml_escape($_[1]), xml_escape($_[2]);
+ }
+
+ # <br />
+ sub br { return '<br />' }
}