]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/babel.pl
debugging added
[infobot.git] / src / Modules / babel.pl
index 7cca74ef52d61508f654a0237aca5f338b64db3c..26cad3c5219c73ba26e482fe18c8a6f320915671 100644 (file)
@@ -88,6 +88,16 @@ sub translate {
     my $translated;
     if ($res->is_success) {            # success.
        my $html = $res->content;
+       my $textarea    = 0;
+       foreach (split "\n", $html) {
+           $textarea   = 1     if (/<textarea/i);
+           next unless ($textarea);
+
+           &DEBUG("   '$_'");
+
+           $textarea   = 0     if (/<\/textarea/i);
+       }
+
        $html   =~ s/\cM//g;
        $html   =~ s/\n\s*\n/\n/g;
        $html   =~ s/\n/ /g;    # ...