More "blank" characters to recognize around smileys
| Project: | Smileys |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Recently on my website, I ran into a problem, rather confusing at the first sight: Stand-alone Smiley was never replaced if inserted at the end of text, even if there was white-space after. It took me a while to realize, that the "white-space" after smiley was in fact a hard-space (or at least we call it this way in my country - I mean the good old hex. code A0, now in UTF-8 encoded as C2 A0). This character, in my case created by another text-filtering module (Texy!; but might be easily inserted in other ways too) is very confusing, as it looks like an ordinary white-space. In fact it IS ordinary white-space, just disallowing line-breaking.
So, I need Smileys to recognize this kind of white-space, if surrounding a stand-alone smiley. Also more brackets would be nice. I created a patch, which is just a little change to the regexp used.
For normal (not stand-alone) smileys there's no need to use regexp at all, a simple str_replace() will do just fine. Since this is faster and recommended, I included this change too.
Patch attached.
| Attachment | Size |
|---|---|
| smileys-hard-space.patch | 1.22 KB |

#1
My problem with Stand-alone is I cant disable it ( it always works like it were active all the time)
to replace the acronym (3-Spade) it must be between spaces (3-Spades)(3-Spades) ins't work and like this (3-Spades) (3-Spades)it works :(
This patch will fix that?
#2
HellMind, I guess that was another issue, which is fixed in development release right now. Please let me know if there's any such issue again.
#3
I don't find this issue to be problematic for most of the websites. However, if this really pinches, feel free to reopen the issue.
#4
I rolled this into my new patch over at #567290: Problem with Recognition of Word Boundaries eg. two consecutive smilies.