Recent Topics

1 Jun 04, 2011 16:16    

My b2evolution Version: Not Entered

I've noticed that when people use the laughing emoticon in the comments on my blog (I have smileys enabled), it puts in some excess code after displaying the laughing smiley.

)" alt=":))" class="middle" width="15" height="15" />

I don't think it's a browser issue since I see the same thing in IE7, IE 9 and Firefox 4.

Here are two examples where I can see the excess code:
http://b2evolution.net/news/2004/09/10/ironic
http://www.otterine.com/blog/blog1.php/that-s-not-the-color-i-wanted

Any ideas on how to fix this? I'm using b2e 4.0.5

Thank you!

2 Jun 05, 2011 05:52

Thanks for the info. Fixed in CVS.

In /plugins/_smilies.plugin.php line 264
Replace

foreach( $tmpsmilies as $smiley )
{
	$this->search[] = $smiley[ 'code' ];
	$this->replace[] = $this->get_smiley_img_tag($smiley);
}

with this

foreach( $tmpsmilies as $smiley )
{
	$this->search[] = $smiley['code'];
	$smiley_masked = '';
	for( $i = 0; $i < strlen($smiley['code'] ); $i++ )
	{
		$smiley_masked .= '&#'.ord(substr($smiley['code'], $i, 1)).';';
	}
	$smiley['code'] = $smiley_masked;
	$this->replace[] = $this->get_smiley_img_tag($smiley);
}


Form is loading...