Ticket #3222 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 5 years ago

more...) smilies fun

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

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

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

Change History

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   matt5 years ago

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

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.

  • Cc Nazgul added
  • Keywords Nazgul removed

Nazgul5 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. ;)

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

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

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

Note: See TracTickets for help on using tickets.