Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#3222 closed defect (bug) (fixed)

more...) smilies fun

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


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.




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


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 18 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Nazgul
18 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. :)

#2 @matt
18 years ago

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

#3 @foolswisdom
18 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.

#4 @foolswisdom
18 years ago

  • Cc Nazgul added
  • Keywords Nazgul removed

18 years ago

#5 @Nazgul
18 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. ;)

#6 @foolswisdom
18 years ago

Thanks Nazgul. Tested it and deployed on .

#7 @markjaquith
18 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.