X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Fblock.tidy.php;h=20aeb0d23815055cdb4251a14b94f6779e17b73e;hb=46395fb8f3c53339b0a6b2abdd6d30568b47a010;hp=06254aa4742b0588af58f219e6d4821be1b15e68;hpb=5ddeb07cc787dd1dc3630a31f1528f5cc7c4d9b9;p=platal.git diff --git a/plugins/block.tidy.php b/plugins/block.tidy.php index 06254aa..20aeb0d 100644 --- a/plugins/block.tidy.php +++ b/plugins/block.tidy.php @@ -19,28 +19,21 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -$tidy_on = Array( - 'drop-empty-paras', - 'drop-font-tags', - 'drop-proprietary-attributes', - 'hide-comments', - 'logical-emphasis', - 'output-xhtml', - 'replace-color', - 'show-body-only' -); -$tidy_off = Array( - 'clean', - 'join-styles', - 'join-classes' -); - -foreach($tidy_on as $opt) { tidy_setopt($opt, true); } -foreach($tidy_off as $opt) { tidy_setopt($opt, false); } -tidy_setopt('alt-text', '[ inserted by TIDY ]'); -tidy_setopt('wrap', '120'); -tidy_set_encoding('latin0'); -unset($tidy_o, $tydy_off); +global $tidy_config; +$tidy_config = array( + 'drop-empty-paras' => true, + 'drop-font-tags' => true, + 'drop-proprietary-attributes' => true, + 'hide-comments' => true, + 'logical-emphasis' => true, + 'output-xhtml' => true, + 'replace-color' => true, + 'show-body-only' => true, + 'clean' => false, + 'join-styles' => false, + 'join-classes' => false, + 'alt-text' => '[ inserted by TIDY ]', + 'wrap' => '120'); /* * Smarty plugin @@ -53,7 +46,9 @@ unset($tidy_o, $tydy_off); */ function smarty_block_tidy($params, $content, &$smarty) { - return tidy_repair_string($content); + global $tidy_config; + return tidy_repair_string($content, $tidy_config, 'utf8'); } +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>