Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[miscperl] r273: LJSUP-11751: Incorrect look Trava widget...

Committer: amyshkin
LJSUP-11751: Incorrect look Trava widget in some style
U   trunk/HTMLCleaner.pm
Modified: trunk/HTMLCleaner.pm
===================================================================
--- trunk/HTMLCleaner.pm	2011-09-21 13:17:10 UTC (rev 272)
+++ trunk/HTMLCleaner.pm	2012-04-09 13:56:48 UTC (rev 273)
@@ -10,15 +10,17 @@
 sub new {
     my ($class, %opts) = @_;
 
-    my $p = new HTML::Parser('api_version' => 3);
-    $p->handler('start' =>  \&start, 'self, tagname, attr, attrseq, text' );
-    $p->handler('end' =>  \&end, 'self, tagname' );
-    $p->handler('text' =>  \&text, 'self, text' );
-    $p->handler('declaration' =>  \&decl, 'self, tokens' );
+    my $p = new HTML::Parser(
+        'api_version'   => 3,
+        'start_h'       => [ \&start, 'self, tagname, attr, attrseq, text' ],
+        'end_h'         => [ \&end, 'self, tagname' ],
+        'text_h'        => [ \&text, 'self, text' ],
+        'declaration_h' => [ \&decl, 'self, tokens' ],
+    );
 
-    $p->{'output'}  = $opts{'output'} || sub {};
-    $p->{'cleaner'} = CSS::Cleaner->new;
-    $p->{'valid_stylesheet'} = $opts{'valid_stylesheet'} || sub { 1 };
+    $p->{'output'}               = $opts{'output'} || sub {};
+    $p->{'cleaner'}              = CSS::Cleaner->new;
+    $p->{'valid_stylesheet'}     = $opts{'valid_stylesheet'} || sub { 1 };
     $p->{'allow_password_input'} = $opts{'allow_password_input'} || 0;
 
     $p->utf8_mode(1);

Tags: amyshkin, miscperl, pm, zilogic
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments