# Blosxom Plugin: numeric_entities -*-cperl-*- # Author(s): Jason Blevins # Version: 2007-11-20 # Documentation: Read below or type "perldoc numeric_entities". # Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net # Plugin Docs: http://blosxom.sf.net/documentation/developers/plugins.html package numeric_entities; use MathML::Entities qw(name2utf8 name2numbered); use strict; # ----- Optional configuration ----- # Set $utf8 to 1 to convert named entities to utf-8 characters instead of # numbered HTML entities. our $utf8 = 0; # ----- End configuration ----- sub start { 1; } sub story { my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_; if ($utf8) { $$body_ref = name2utf8($$body_ref); } else { $$body_ref = name2numbered($$body_ref); } 1; } sub end { 1; } 1; __END__ =head1 NAME Blosxom Plug-in: numeric_entities =head1 SYNOPSIS Converts XHTML+MathML named entities to numeric character references, or optionally, utf-8 characters. =head1 VERSION 2007-11-20 =head1 AUTHORS Jason Blevins =head1 INSTALLATION AND CONFIGURATION Simply place this plugin in your Blosxom plugins directory. =head1 SEE ALSO numeric_entities homepage: http://jblevins.org/projects/blosxom/numeric_entities NumericEntities Movable Type Plugin: http://golem.ph.utexas.edu/~distler/blog/NumericEntities.html MathML::Entities module on CPAN: http://search.cpan.org/~distler/MathML-Entities/lib/MathML/Entities.pm =head1 BUGS Send bug reports and comments to Jason Blevins . =head1 VERSION HISTORY 2007-11-20: Initial revision. =head1 LICENSE Copyright (C) 2007 Jason Blevins This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .