HTML::HTML5::Entities - Online Linux Manual PageSection : 3pm
Updated : 2020-12-28
Source : perl v5.32.0
Note : User Contributed Perl Documentation

NAMEHTML::HTML5::Entities − drop−in replacement for HTML::Entities

SYNOPSIS​ use HTML::Entities; ​ ​ my $enc = encode_entities('fish & chips'); ​ print "$enc\n"; # fish & chips ​ ​ my $dec = decode_entities($enc); ​ print "$dec\n"; # fish & chips

DESCRIPTIONThis is a drop-in replacement for HTML::Entities, providing the character entities defined in HTML5. Some caveats: • The implementation is pure perl, hence in some cases slower, especially decoding. • It will not work in Perl < 5.8.1.

Functionsdecode_entities($string, ...) This routine replaces HTML entities found in the $string with the corresponding Unicode character. If multiple strings are provided as arguments they are each decoded separately and the same number of strings are returned. If called in void context the arguments are decoded in-place. This routine is exported by default. _decode_entities($string, \%entity2char) _decode_entities($string, \%entity2char, $expand_prefix) This will in-place replace HTML entities in $string. The ​%entity2char hash must be provided. Named entities not found in the %entity2char hash are left alone. Numeric entities are always expanded. If $expand_prefix is TRUE then entities without trailing ; in ​%entity2char will even be expanded as a prefix of a longer unrecognized name. ​ $string = "foo bar"; ​ _decode_entities($string, { nb => "@", nbsp => "\xA0" }, 1); ​ print $string; # will print "foo bar" This routine is exported by default. encode_entities($string) encode_entities($string, $unsafe_chars) This routine replaces unsafe characters in $string with their entity representation. A second argument can be given to specify which characters to consider unsafe (i.e., which to escape). This may be a regular expression. If called in void context the string is encoded in-place. This routine is exported by default. encode_entities_numeric($string) This routine works just like encode_entities, except that the replacement entities are always numeric. This routine is not exported by default. num_entity($string) Given a single character string, encodes it as a numeric entity. This routine is not exported by default. The following functions cannot be exported. They behave the same as the exportable functions. HTML::Entities::decode($string, ...) HTML::Entities::encode($string) HTML::Entities::encode($string, $unsafe_characters) HTML::Entities::encode_numeric($string) HTML::Entities::encode_numeric($string, $unsafe_characters) HTML::Entities::encode_numerically($string) HTML::Entities::encode_numerically($string, $unsafe_characters) 

Variables$HTML::HTML5::Entities::hex This variable controls whether numeric entities will use hexadecimal or decimal notation. It is TRUE (hexadecimal) by default, but can be set to ​FALSE. It only affects the encoding functions. Decoding always understands both notations. %HTML::HTML5::Entities::char2entity %HTML::HTML5::Entities::entity2char There contain the mapping from all characters to the corresponding entities (and vice versa, respectively). These variables may be exported. Note that %char2entity is a more conservative set of mappings, intended to be safe for serialising strings to HTML4, HTML5 and XHTML 1.x. And for hysterical raisins, %entity2char does not include the leading ampersands, while %char2entity does.

BUGSPlease report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=HTML−HTML5−Entities>.

SEE ALSOHTML::Entities, HTML::HTML5::Parser, HTML::HTML5::Writer.

AUTHORToby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

Encoding and Decoding FunctionsCopyright (c) 1995−2006 by Gisle Aas. Copyright (c) 2012 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Entity TablesCopyright (c) 2004−2007 by Apple Computer Inc, Mozilla Foundation, and Opera Software ASA. Copyright (c) 2007−2011 by Wakaba <w@suika.fam.cx>. Copyright (c) 2009−2012 by Toby Inkster <tobyink@cpan.org>.

DISCLAIMER OF WARRANTIESTHIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
0
Johanes Gumabo
Data Size   :   17,796 byte
man-HTML::HTML5::Entities.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 165,500
Visitor ID   :     :  
Visitor IP   :   3.137.174.253   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|HTML::HTML5::Entities.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|HTML::HTML5::Entities.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|HTML::HTML5::Entities.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|HTML::HTML5::Entities.3pm|43|'br══─}─══ |'br══─}─══ )