Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 months ago

#6739 closed defect (bug) (wontfix)

smilie regular expression issue

Reported by: hailin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


There is an issue with $wp_smiliessearch, it will miss some valid smilies.
For example, for :) the pattern is:

If the input is ":) :) :) :)"
It will produce only two smilies.

The fix is to change the pattern to:

Attachments (2)

6739_smilie_pattern.diff (755 bytes) - added by hailin 8 years ago.
8comments.png (11.9 KB) - added by aholm 7 years ago.

Download all attachments as: .zip

Change History (7)

8 years ago


#1 @jacobsantos
7 years ago

  • Summary changed from smilie regular experssion issue to smilie regular expression issue

#2 @markjaquith
7 years ago

  • Milestone changed from 2.7 to 2.8

What are some of the potential downsides to a more liberal expression? Can you think of any cases where we'd accidentally make a smiley where there shouldn't be one?

7 years ago

#3 @aholm
7 years ago

There are some issues with making it more liberal. There are even some issues right now as can be seen in some themes, like the one Matt uses. See attached screenshot for how it looks when a post has 8 comments which the theme shows as (8) which is replaced with (<img src="icon-cool.gif"> or so, which is then parsed as the appropriate markup.

#4 @thee17
7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

I'm closing as won't fix as this has big downsides, and has lost traction. Reopen if you disagree.

#5 @DrewAPicture
7 months ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.