diff options
author | Sebastian Silva <sebastian@sugarlabs.org> | 2011-10-12 00:54:31 (GMT) |
---|---|---|
committer | Sebastian Silva <sebastian@sugarlabs.org> | 2011-10-12 00:54:31 (GMT) |
commit | fe1a1eb79bf0f1df8bbc56d2402e32061af79d06 (patch) | |
tree | d39e3b7780e4b6949250d490a4a7a874f788981c /studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base | |
parent | 5861585e94a32b3032ac473804bf90c6e1363940 (diff) |
Tidy up code a bit - added documentation
Diffstat (limited to 'studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base')
-rw-r--r-- | studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base b/studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base new file mode 100644 index 0000000..23b9bec --- /dev/null +++ b/studio/static/js/wymeditor/plugins/tidy/.svn/text-base/tidy.php.svn-base @@ -0,0 +1,36 @@ +<?php + +if (get_magic_quotes_gpc()) $html = stripslashes($_REQUEST['html']); +else $html = $_REQUEST['html']; + +if(strlen($html) > 0) { + + // Specify configuration + $config = array( + 'bare' => true, + 'clean' => true, + 'doctype' => 'strict', + 'drop-empty-paras' => true, + 'drop-font-tags' => true, + 'drop-proprietary-attributes' => true, + 'enclose-block-text' => true, + 'indent' => false, + 'join-classes' => true, + 'join-styles' => true, + 'logical-emphasis' => true, + 'output-xhtml' => true, + 'show-body-only' => true, + 'wrap' => 0); + + // Tidy + $tidy = new tidy; + $tidy->parseString($html, $config, 'utf8'); + $tidy->cleanRepair(); + + // Output + echo $tidy; +} else { + +echo ('0'); +} +?> |