logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Sympa::HTMLDecorator - Decorating HTML texts

Description

       Sympa::HTMLDecorator transforms HTML texts.

   Methods
       instance ( )
           Constructor.  Returns singleton instance of this class.

       decorate ( $html, email => $mode )
           Instancemethod.  Modifies HTML text.

           Parameters:

           $html
               A text including HTML document or fragment.  It must be encoded by UTF-8.

           email => $mode
               Transformation mode.  'at' replaces "@" in email addresses.  'javascript' obfuscates emails using
               JavaScript code.

           Returns:

           Modified text.

History

       Sympa::HTMLDecorator appeared on Sympa 6.2.14.

6.2.76                                             2025-02-12                       Sympa::HTMLDecorator(3Sympa)

Name

       Sympa::HTMLDecorator - Decorating HTML texts

See Also

       Sympa::HTMLSanitizer.

Synopsis

         use Sympa::HTMLDecorator;
         $decorator = Sympa::HTMLDecorator->instance;
         $ouput = $decorator->decorate($html, email => 'javascript');

See Also