BBCode-Parser

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


        Many BBCode tags will add CSS classes as style hooks in the output
        HTML, such as `<div class="bbcode-quote">...</div>'. This setting
        allows you to override the naming scheme for those hooks. At the
        moment, more direct control of the CSS class names is not available.

    css_direct_styles
        (Type: Boolean; Default: FALSE)

        Certain style-related BBCode tags, such as [U] (underline) and [S]
        (strike-through) don't have a direct equivalent in modern XHTML 1.0
        Strict. If this value is TRUE, then the generated HTML will use a
        `style' attribute on a `<span>' tag to simulate the effects. If this
        value is FALSE, then the style attribute will be omitted. In either
        case, a `class' attribute is provided for use as a hook by external
        CSS stylesheets (not provided).

    follow_links
        (Type: Boolean; Default: FALSE)

        To prevent blog spam and the like, many search engines now allow

lib/BBCode/Parser.pm  view on Meta::CPAN

Many BBCode tags will add CSS classes as style hooks in the output HTML, such
as C<< <div class="bbcode-quote">...</div> >>.  This setting allows you to
override the naming scheme for those hooks.  At the moment, more direct control
of the CSS class names is not available.

=item css_direct_styles

(Type: Boolean; Default: FALSE)

Certain style-related BBCode tags, such as [U] (underline) and [S]
(strike-through) don't have a direct equivalent in modern XHTML 1.0 Strict.
If this value is TRUE, then the generated HTML will use a C<style> attribute
on a C<E<lt>spanE<gt>> tag to simulate the effects.  If this value is FALSE,
then the style attribute will be omitted.  In either case, a C<class> attribute
is provided for use as a hook by external CSS stylesheets (not provided).

=item follow_links

(Type: Boolean; Default: FALSE)

To prevent blog spam and the like, many search engines now allow HTML authors

lib/BBCode/Tag.pm  view on Meta::CPAN


In a web environment, a round-trip using C<toBBCode> is recommended each time
the user previews his/her message.  This makes it easier for the user to spot
troublesome code.

=head3 toHTML

Converts this BBCode tree to HTML.  This is generally the entire point of
using BBCode.

At the moment, only XHTML 1.0 Strict output is supported.  Future versions will
likely support other HTML standards.

=head3 toText

Converts this BBCode tree to plain text.

Note that the result may contain Unicode characters.  It is strongly
recommended that you use UTF-8 encoding whenever you store or transmit the
resulting text, to prevent loss of information.  You might look at
L<the Text::Unidecode module|Text::Unidecode> if you want 7-bit ASCII output.



( run in 0.816 second using v1.01-cache-2.11-cpan-95122f20152 )