milesj / decoda

A lightweight lexical string parser for BBCode styled markup.
MIT License
196 stars 52 forks source link

emoticons in [code] #9

Closed fantgeass closed 12 years ago

fantgeass commented 12 years ago
<?php
$string = '[code]<?php  echo 123;)  ?>[/code]';
$code = new Decoda($string);
$code->defaults();
echo $code->parse(); ?>  
// <pre class="decoda-code ">&lt;?php  echo 123<img alt="" src="/decoda/decoda/emoticons/wink.png">  ?&gt;</pre>
milesj commented 12 years ago

Whats your environment? I'm seeing no problems when placing smilies within code blocks.

fantgeass commented 12 years ago

I think, inside the tag [code] shouldn't work the hooks, because meaning can lose, if any part will match with the templates.

milesj commented 12 years ago

Yes of course, however, smiley faces in my [code] blocks work fine :/

You on windows or linux? And what PHP version?

fantgeass commented 12 years ago

Windows 7, PHP 5.3.8

milesj commented 12 years ago

Here's an image of my test, works fine for me :/

http://i.imgur.com/kp0PC.jpg

Windows 7, PHP 5.3.8 also.

milesj commented 12 years ago

Jk figured out why mine wasn't rendering. Will try a fix.

milesj commented 12 years ago

Can you clone and test the latest version?

https://github.com/milesj/php-decoda

fantgeass commented 12 years ago

Now works fine, thanks.