funky_javascript_fix

Definition:
function funky_javascript_fix($text) {}

Fixes javascript bugs in browsers.
Converts unicode characters to HTML numbered entities.

Parameters

  • string $text: Text to be made safe.

Return values

returns:Fixed text.

Source code

function funky_javascript_fix($text) {

	_deprecated_function( __FUNCTION__, '3.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;

}

1098

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: