function funky_javascript_fix($text) {}

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


  • 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})/",



	return $text;



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: Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: