I don't really know, whether it's a bug or whether it's supposed to be that way, but an emoticon that's entered right at the beginning of a comment is not being replaced by its' icon. I stumbled upon this after I added an emoticons.inc.php and wanted to test that. I have seen this behavior with 1.0-beta2 and a relatively current 1.1-build.
I hope someone can shed some light on this issue.
TIA,
Andre
Emoticons in comments
Yes, to prevent making emoticons out of stuff that's really supposed to be symbols or text, we only convert the emoticon text if it's got a tab, space, period, exclamation point, or greater-than; AND if it ends with the same stuff (but less-than instead of greater-than) or end-of-line.
Phew.
If you want it to work at the very beginning, too, go to serendipity_event_emoticate.php, around line 175, and replace this:
with this:
Let me know how it works out.
Phew.
If you want it to work at the very beginning, too, go to serendipity_event_emoticate.php, around line 175, and replace this:
Code: Select all
$element = preg_replace("/([\t\s\.\!>]+)" . $key . "([\t\s\!\.\)<]+|\$)/U",
Code: Select all
$element = preg_replace("/([\t\s\.\!>]+|^)" . $key . "([\t\s\!\.\)<]+|\$)/U",
So it's intentional behavior. I'll just tell my readers, and that should do it. Thanks for the explanationjudebert wrote:Yes, to prevent making emoticons out of stuff that's really supposed to be symbols or text, we only convert the emoticon text if it's got a tab, space, period, exclamation point, or greater-than; AND if it ends with the same stuff (but less-than instead of greater-than) or end-of-line.
Phew.
Andre