Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add some filtering. Props jhodgdon. fixes #5030

git-svn-id: http://svn.automattic.com/wordpress/trunk@6147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 2794b34f4a0235027fd36e1796e8ebfea3e16208 1 parent 9434917
ryan authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  wp-admin/import/wp-cat2tag.php
  2. +2 −2 wp-admin/post-new.php
View
2  wp-admin/import/wp-cat2tag.php
@@ -48,6 +48,8 @@ function categories_form() {
$hier = _get_term_hierarchy('category');
foreach ($this->all_categories as $category) {
+ $category = sanitize_term( $category, 'category', 'display' );
+
if ((int) $category->parent == 0) {
print '<li><label><input type="checkbox" name="cats_to_convert[]" value="' . intval($category->term_id) . '" /> ' . $category->name . ' (' . $category->count . ')</label>';
View
4 wp-admin/post-new.php
@@ -94,11 +94,11 @@
<?php
if ($is_NS4 || $is_gecko) {
?>
-<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_option('blogname'))); ?></a>
+<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), get_bloginfo('name', 'display')); ?></a>
<?php
} else if ($is_winIE) {
?>
-<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
+<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_bloginfo('name', 'display')); ?></a>
<script type="text/javascript">
<!--
function oneclickbookmarklet(blah) {
Please sign in to comment.
Something went wrong with that request. Please try again.