X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTML%2FString.pm;h=4a715f36d48ad03474ad1450448bc9ce76941cb4;hb=cf61306dc93f5176e1fd15d2f6ac8338a8481dfd;hp=a320a69e8aa391ed8b54fd0c102c90e7e13ec22a;hpb=d86bdf828539c046cbc09d5073897bf24862c93d;p=scpubgit%2FHTML-String.git
diff --git a/lib/HTML/String.pm b/lib/HTML/String.pm
index a320a69..4a715f3 100644
--- a/lib/HTML/String.pm
+++ b/lib/HTML/String.pm
@@ -4,6 +4,10 @@ use strictures 1;
use HTML::String::Value;
use Exporter 'import';
+our $VERSION = '1.000006'; # 1.0.6
+
+$VERSION = eval $VERSION;
+
our @EXPORT = qw(html);
sub html {
@@ -26,7 +30,7 @@ HTML::String - mark strings as HTML to get auto-escaping
my $html = html('
').$not_html.html('
');
- print html($html); # Hello, Bob " Jake
+ print html($html); # Hello, Bob & Jake
or, alternatively,
@@ -39,7 +43,7 @@ or, alternatively,
"${not_html}
";
}
- print html($html); # Hello, Bob " Jake
+ print html($html); # Hello, Bob & Jake
(but see the L documentation for details and caveats).
@@ -114,6 +118,19 @@ L for more details.
For integration with L, see L.
+=head1 CHARACTERS THAT WILL BE ESCAPED
+
+HTML::String concerns itself with characters that have special meaning in
+HTML. Those which begin and end tags (< and >), those which begin an entity
+(&) and those which delimit attribute values (" and '). It outputs them
+in a fashion compatible with HTML 4 and newer and all versions of XHTML
+(assuming support for named entities in the parser). There are no known
+incompatibilities with browsers.
+
+HTML::String does not concern itself with other characters, it is assumed
+that HTML documents will be marked with a suitable character encoding via
+a Content-Type HTTP header and/or a meta element.
+
=head1 EXPORTS
=head2 html
@@ -140,7 +157,8 @@ mst - Matt S. Trout (cpan:MSTROUT)
=head1 CONTRIBUTORS
-None yet - maybe this software is perfect! (ahahahahahahahahaha)
+dorward - David Dorward (cpan:DORWARD)
+rafl - Florian Ragwitz (cpan:FLORA)
=head1 COPYRIGHT