diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-06-12 13:57:58 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-06-12 13:57:58 +0000 |
| commit | 6f95970f48b112ccc2859581bba639af1aa15f33 (patch) | |
| tree | bb67f16431a6fef006b0f5367f3de8a3ca652c87 /admin/filter_htmlpurifier.php | |
| parent | 0204983d8ffdbd5d8b8c7e65b94b069733fec097 (diff) | |
| download | liberty-6f95970f48b112ccc2859581bba639af1aa15f33.tar.gz liberty-6f95970f48b112ccc2859581bba639af1aa15f33.tar.bz2 liberty-6f95970f48b112ccc2859581bba639af1aa15f33.zip | |
Move html purification stuff into filters. Still need to address style purifier user issue and filter ordering.
Diffstat (limited to 'admin/filter_htmlpurifier.php')
| -rw-r--r-- | admin/filter_htmlpurifier.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/admin/filter_htmlpurifier.php b/admin/filter_htmlpurifier.php index 780da7b..c4d358f 100644 --- a/admin/filter_htmlpurifier.php +++ b/admin/filter_htmlpurifier.php @@ -5,49 +5,49 @@ include_once( KERNEL_PKG_PATH.'simple_form_functions_lib.php' ); $gBitSystem->verifyPermission( 'p_admin' ); $htmlPurifier = array( - 'liberty_html_pure_escape_bad' => array( + 'htmlpure_escape_bad' => array( 'label' => 'Escape invalid HTML', 'note' => ' Escapes invlid HTML as text. Otherwise invalid HTML is silently dropped. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#Core.EscapeInvalidTags">this</a> and <a href="http://htmlpurifier.org/live/configdoc/plain.html#Core.EscapeInvalidChildren">this</a> for more information.', 'default' => 'y' ), - 'liberty_html_pure_disable_extern' => array( + 'htmlpure_disable_extern' => array( 'label' => 'Disable External Links', 'note' => 'Disables links to external websites which is effective against spam. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#URI.DisableExternal">this</a> for more information.', 'default' => 'n' ), - 'liberty_html_pure_disable_extern_res' => array( + 'htmlpure_disable_extern_res' => array( 'label' => 'Disable External Resounces', 'note' => 'Disables the embedding of external resource like images from other hosts. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#URI.DisableExternalResources">this</a> for more information.', 'default' => 'y' ), - 'liberty_html_pure_disable_res' => array( + 'htmlpure_disable_res' => array( 'label' => 'Disable All Resources', 'note' => 'Disables the embedding of all resources preventing users from including pictures at all. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#URI.DisableResources">this</a> for more information.', 'default' => 'n' ), - 'liberty_html_pure_disable_uri' => array( + 'htmlpure_disable_uri' => array( 'label' => 'Disable all URIs', 'note' => 'Disables all URIs in all forms within submitted content. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#URI.Disable">this</a> for more information.', 'default' => 'n' ), - 'liberty_html_pure_use_redirect' => array( + 'htmlpure_use_redirect' => array( 'label' => 'Use Redirect', 'note' => 'Uses the redirect service in the Redirect URI. This can be handy to track clicks out and prevent leacks of PageRank. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#URI.Munge">this</a> for more information.', 'default' => 'n' ), - 'liberty_html_pure_strict_html' => array( + 'htmlpure_strict_html' => array( 'label' => 'Force Strict', 'note' => 'Determines if the purification matches the Transitional or Strict rule sets. See <a href="http://htmlpurifier.org/live/configdoc/plain.html#HTML.Strict">this</a> for more information.', 'default' => 'y' ), - 'liberty_html_pure_xhtml' => array( + 'htmlpure_xhtml' => array( 'label' => 'Force XHTML', 'note' => 'Determine if purification forces only XHTML tags or if it allows standard HTML.', 'default' => 'y' ), // TODO: We should parse the plugins directory to generate these // so that new plugins just have to be dropped in the dir and turned on. - 'liberty_html_pure_allow_youtube' => array( + 'htmlpure_allow_youtube' => array( 'label' => 'Allow YouTube', 'note' => 'Allow YouTube videos to be passed through.', 'default' => 'n' @@ -60,7 +60,7 @@ if( !empty( $_REQUEST['apply'] )) { foreach( $formFeatures as $item => $data ) { simple_set_toggle( $item, LIBERTY_PKG_NAME ); } - + $errors = array(); if( !empty($_REQUEST['blacklisted_html_tags'] )) { $tags = preg_replace( '/\s/', '', $_REQUEST['blacklisted_html_tags'] ); if( strlen( $tags ) > 250 ) { @@ -69,6 +69,7 @@ if( !empty( $_REQUEST['apply'] )) { } $gBitSystem->storeConfig('blacklisted_html_tags', $tags , LIBERTY_PKG_NAME ); } + $gBitSmarty->assign($errors); } $gBitSystem->display( 'bitpackage:liberty/filter_htmlpurifier.tpl', 'HTML Purifier' ); |
