Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 5 years 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 12 years ago.
8comments.png (11.9 KB) - added by aholm 11 years ago.

Download all attachments as: .zip

Change History (7)

12 years ago


#1 @jacobsantos
11 years ago

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

#2 @markjaquith
11 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?

11 years ago

#3 @aholm
11 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
11 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
5 years ago

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