From: b Date: Tue, 30 May 2023 22:25:30 +0000 (+0000) Subject: html entity decoding X-Git-Tag: v1.0.0~8 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=feb138022ef18fb4bfa8fcf61482a1b4ea6de94e;p=ott%2Fpost html entity decoding --- diff --git a/botm-common b/botm-common index b32a014..5eb6fff 160000 --- a/botm-common +++ b/botm-common @@ -1 +1 @@ -Subproject commit b32a014fe5391f7557580eb2e1263e2f8e7bfc94 +Subproject commit 5eb6fff2ecca3f68b44aeffcfaf10663a9e72502 diff --git a/sendpost.1.pl b/sendpost.1.pl index 49b9ef5..f1bd7fc 100644 --- a/sendpost.1.pl +++ b/sendpost.1.pl @@ -25,7 +25,7 @@ use botm_common ( 'read_data_file', 'write_data_file', 'url_encode', 'url_decode', 'join_path', - 'html_entity_encode_dec', 'html_entity_encode_hex' + 'html_entity_decode' ); ###PERL_ENCODING_FILE_IN: use constant ENCODING_FILE_IN => 'UTF-8'; @@ -103,12 +103,23 @@ GetOptions ( 'help|h' => \$options{ 'help'} ); -print html_entity_encode_dec('')."\n"; -print html_entity_encode_dec('', '', 1)."\n"; -print html_entity_encode_dec('', 'UTF-8', 1)."\n"; -print html_entity_encode_hex('')."\n"; -print html_entity_encode_hex('', '', 1)."\n"; -print html_entity_encode_hex('', 'UTF-8', 1)."\n"; +print html_entity_decode( + 'illegal: "&" -' . "\n". + 'name(gt): ">" -' . "\n". + 'name_inf(gta): ">a" -' . "\n". + 'decimal(126): "~" -' . "\n". + 'hexadecimal(7E). "~" -' . "\n". + 'bad names: Y;&enhedksdh; -' . "\n". + 'finally, some text :> -' +)."\n"; + + +# print html_entity_encode_dec ('')."\n"; +# print html_entity_encode_hex ('')."\n"; +# print html_entity_encode_name('')."\n"; +# print html_entity_encode_dec ('', 1)."\n"; +# print html_entity_encode_hex ('', 1)."\n"; +# print html_entity_encode_name('', 1)."\n"; exit 0; if ($options{'help'} ne '') {