Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 10 years ago

#6739 closed defect (bug) (wontfix)

smilie regular expression issue

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

Description

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 17 years ago.
patch
8comments.png (11.9 KB) - added by aholm 16 years ago.

Download all attachments as: .zip

Change History (7)

@hailin
17 years ago

patch

#1 @jacobsantos
16 years ago

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

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

@aholm
16 years ago

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

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