Warning: This function has been deprecated.

funky_javascript_fix( string $text ): string

Fixes JavaScript bugs in browsers.


Description

Converts unicode characters to HTML numbered entities.


Top ↑

Parameters

$text string Required
Text to be made safe.

Top ↑

Return

string Fixed text.


Top ↑

Source

File: wp-includes/deprecated.php. View all references

function funky_javascript_fix($text) {
	_deprecated_function( __FUNCTION__, '3.0.0' );
	// Fixes for browsers' JavaScript bugs.
	global $is_macIE, $is_winIE;

	if ( $is_winIE || $is_macIE )
		$text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
					"funky_javascript_callback",
					$text);

	return $text;
}


Top ↑

Changelog

Changelog
Version Description
3.0.0 This function has been deprecated.
1.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.