Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 3 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: /(\s|)\:\)(\s|$)/

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

The fix is to change the pattern to: /(\s*|)\:\)(\s|$)/

Attachments (2)

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

Download all attachments as: .zip

Change History (7)

10 years ago


#1 @jacobsantos
10 years ago

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

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

9 years ago

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

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