WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#3222 closed defect (bug) (fixed)

more...) smilies fun

Reported by: foolswisdom Owned by: Nazgul
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Some themes use (more...) for <!--more--> this is currently being converted into (more[smiley]

I think smilies should only be translated if there is they are the first think on the line (with a space or nothing after it), or if there is a space before it.

Currently:

more...)

more:)

gets translated into mor[smiley] . Sad smilies :( I don't think .) should even be translated.

ADDITIONAL DETAILS

Does not occur in WP 2.0.4+ r6653

Copying Nazgul b/c of his recent work in this area: ticket:2444 , #1279 , #3201 , #3216

Attachments (1)

3222.diff (1.5 KB) - added by Nazgul 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @Nazgul8 years ago

The text "(more...)" is being translated into (more&#8239;)" by wptexurize, which in turn gets smilified.

I'm beginning to dislike smilies. There seems to be another fringe case I haven't thought of all the time. I'll take a look at this tonight when I get back from work.

In the meantime. Suggestions are welcome. :)

comment:2 @matt8 years ago

Interesting compound bug. Requiring whitespace before a smiley seems reasonable, and i think in line with our previous behaviour.

comment:3 @foolswisdom8 years ago

Nazgul, ugg that is nasty. I also joked to the team that I don't like smilies any more. Let me know if it is better if I break it out into two (or more) separate bugs.

comment:4 @foolswisdom8 years ago

  • Cc Nazgul added
  • Keywords Nazgul removed

@Nazgul8 years ago

comment:5 @Nazgul8 years ago

  • Keywords has-patch added
  • Owner changed from anonymous to Nazgul
  • Status changed from new to assigned

A patch is up.

Smilies now have to be at the beginning of a line or following a whitespace character and in both instances they have to be at the end of the line or followed by a whitespace character as well.

I also killed my optimization from #3201, because the regex I fabricated to fix this ticket became so complex that it actually became slower that way than without the optimization and with a simple regex.

The one thing I can tell you thogh, is that the next few posts on my personal blog won't contain smilies, because I've seen enough of them for now. ;)

comment:6 @foolswisdom8 years ago

Thanks Nazgul. Tested it and deployed on WP.com .

comment:7 @markjaquith8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4380]) Somewhat stricter smilies replacements by Nazgul. fixes #3222

Note: See TracTickets for help on using tickets.