]> git.nbdom.net Git - nb.git/commitdiff
lib/perl/NB/Functions.pm
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 8 Sep 2026 06:30:41 +0000 (08:30 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 8 Sep 2026 06:30:41 +0000 (08:30 +0200)
lib/perl/NB/Functions.pm

index 0be85e0da3ec85120f86f6af3d35b6895142c119..65d3b4827cee774c0b0ebb105fe41cba2dbb3aa3 100644 (file)
@@ -554,19 +554,6 @@ sub html2txt {
                ( \\n )
        ,\n,gix;
 
-       # Text tags
-  # NB 02.12.23 for my $tag (qw(
-       # NB 02.12.23 div
-       # NB 02.12.23 p
-       # NB 02.12.23 span
-       # NB 02.12.23 pre
-       # NB 02.12.23 code
-  # NB 02.12.23 ))
-  # NB 02.12.23 {
-               # NB 02.12.23 my $exp = "<".$tag."[^>]*>(.*?)</$tag>";
-               # NB 02.12.23 $v =~ s,$exp,$1\n,sgi;
-  # NB 02.12.23 }
-
   # Links
        $v =~ s,
        <a[^>]+href="([^"]+)"[^>]*>\g1</a>
@@ -614,6 +601,7 @@ sub html2txt {
        $v =~ s/[\f ]+/ /g;
        &str_trim($v);
        $v = &NB::Functions::html_unescape($v);
+       $v =~ s/\x{FEFF}/ /g; # <feff>
 
        return $v;
 
@@ -640,8 +628,6 @@ my $str = shift @_;
        return $str;
 }
 
-#die &html_unescape_fix_err("Karcher &ndash  Balayeuse &eacute");
-#die &html_unescape_fix_err("Pull 4 capuche Juventus FC Core pour Gar&#231on (8-15&#160ans)");
 sub html_unescape_fix_err {
 #------------------------------------------------------------------------------
 # NB 09.03.10