WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#27587 closed defect (bug) (fixed)

Smilies and nbsp

Reported by: miqrogroove Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.8
Component: Formatting Keywords: has-patch 4.0-early
Focuses: Cc:

Description

Continuing from #22692 and as a requirement for #26842, we need to make sure things like  ;)  get converted into smilies.

This will involve improvement of the existing unit tests, which expect strange results such as multiple trailing spaces.

Attachments (3)

prior-work.patch (3.3 KB) - added by miqrogroove 7 years ago.
miqro-27587.patch (17.2 KB) - added by miqrogroove 7 years ago.
Remove all extra spaces from expected outputs. Fix unit bugs.
miqro-27587.2.patch (17.3 KB) - added by miqrogroove 6 years ago.
Corrected several more bad tests and refreshed.

Download all attachments as: .zip

Change History (10)

@miqrogroove
7 years ago

Remove all extra spaces from expected outputs. Fix unit bugs.

#1 @miqrogroove
7 years ago

  • Keywords has-patch needs-testing 4.0-early added

#2 @wonderboymusic
6 years ago

  • Keywords needs-refresh added; needs-testing removed
  • Milestone changed from Awaiting Review to 4.0

This patch requires wp_spaces_regexp(), which doesn't exist.

#3 @wonderboymusic
6 years ago

Found it here: #27588

#4 follow-up: @wonderboymusic
6 years ago

  • Keywords needs-refresh removed

14 unit tests fail with the patch after [28708] - is there a pre-req for this patch in another ticket?

#5 in reply to: ↑ 4 @miqrogroove
6 years ago

Replying to wonderboymusic:

14 unit tests fail with the patch after [28708] - is there a pre-req for this patch in another ticket?

It's an improvement, believe me :) I need detailed feedback because I'm not running phpunit. If you could post exactly which tests fail or e-mail that to me, I should be able to fix it. The main problem last time was that the existing tests were based on bad output, including extra spaces that the user didn't type, etc.

@miqrogroove
6 years ago

Corrected several more bad tests and refreshed.

#6 @miqrogroove
6 years ago

Also, try the refreshed patch. I think I found close to 14 more test bugs.

#7 @wonderboymusic
6 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 28717:

smilies_init(), treat   like whitespace when converting smilies.

Adds unit tests.

Props miqrogroove.
Fixes #27587.

Note: See TracTickets for help on using tickets.