I know, it’s dumb, but I think it’s annoying that when someone enters a smiley manually like this hi:) it will not be detected and converted by WordPress because WordPress smilies functions looks for spaces and require a space before and after the smiley replacement.
I searched but I couldn’t find a helpful topic about this, does anyone have any workaround for this? Like automatically replacing smilies text with [space]:)[space] upon post/comment post so it would be detected?
Here’s WordPress expression to match smilies:
/((?:s|^)|(?:_|)(?=s|$))|((?:s|^)x(?:D)(?=s|$))|((?:s|^)o(?:_O)(?=s|$))|((?:s|^)^(?:^ââ¬â¢|^ââ¬Ë|^'|^â)(?=s|$))|((?:s|^)X(?:D)(?=s|$))|((?:s|^)O(?:_o)(?=s|$))|((?:s|^)>(?::D|:(|-I)(?=s|$))|((?:s|^)=(?:^-^=)(?=s|$))|((?:s|^)<(?:3)(?=s|$))|((?:s|^);(?:-)|))(?=s|$))|((?:s|^):(?:ââ¬â¢(|ââ¬Ë(|||x|wink:|whiterussian:|twisted:|star:|smile:|shock:|sad:|roll:|razz:|p|oops:|o|neutral:|mrgreen:|martini:|mad:|lol:|idea:|heart:|grin:|facepalm:|evil:|eek:|developer:|cry:|cool:|burrito:|bear:|arrow:|\|X|P|O|D|???:|?:|?|/|-||-x|-p|-o|-\|-X|-P|-O|-D|-?|-/|-)|-(|)|(|'(|â(|!:)(?=s|$))|((?:s|^)8(?:O|-O|-))(?=s|$))|((?:s|^)((?:w)|W))(?=s|$))|((?:s|^)&(?:lt;3|gt;:D|gt;:(|gt;-I)(?=s|$))/m
Answer to my question is simple, just make sure you remove the
s
character from the above string (or what generates it).