Make WordPress Core

Opened 8 years ago

Last modified 3 years ago

#39636 new enhancement

Smilies not converted when directly followed by punctuation marks

Reported by: ourvalley's profile ourvalley Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.7.1
Component: Formatting Keywords: 2nd-opinion
Focuses: Cc:

Description

Steps to recreate:

  • Create a new post or comment
  • Insert a smilie directly followed by a period or other punctuation mark such as :).
  • View the post or comment

Expected:

Ideally the smilie would show followed by the punctuation mark.

I've attached a screenshot showing how a post with the following text appears. Smiles with a space between them and the punctuation mark show, but the others do not.

This is a test :). It uses smilies :)

If a smilie has punctuation directly after, it is not converted :(! :(

The expected behavior would be to look like this:
:) ! :) ,
However instead they appear as this
:)! :),

Attachments (1)

Screen Shot 2017-01-19 at 6.22.43 AM.png (71.9 KB) - added by ourvalley 8 years ago.

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
8 years ago

  • Component changed from General to Formatting

#2 @costdev
3 years ago

  • Milestone changed from Awaiting Review to 6.0
  • Type changed from defect (bug) to enhancement

Reproduction Report

Env

  • WordPress: 6.0-alpha-52448-src
  • Chrome 97.0.4692.71
  • Windows 10
  • Theme: Twenty Twenty-Two
  • Block Editor
  • Plugins: None activated

Steps to reproduce

  1. Navigate to Posts > Add New.
  2. Paste the following as plain text:
    This is a test :). It uses smilies :)
    
    If a smilie has punctuation directly after, it is not converted :(! :(
    
    The expected behavior would be to look like this:
    :) ! :) ,
    However instead they appear as this
    :)! :),
    
  3. Click "Publish".
  4. Click "View post".
  5. You should see that only 4 of the 8 emoticons will be converted to smilies.

Results

Reproduced.

However, this is actually intended behaviour. The code that does the substitution specifically looks for spaces before converting an emoticon to a smiley. Therefore, this is not a defect (bug).

A quick search online suggests that this appears to have been a pain point for users for quite some years. For this reason, I'm marking this as an enhancement and adding it to the 6.0 milestone for visibility and discussion.

This ticket was mentioned in Slack in #core by costdev. View the logs.


3 years ago

#4 @costdev
3 years ago

  • Keywords 2nd-opinion added

Per the discussion in the bug scrub, I'm adding 2nd-opinion to attract discussion on whether this change is desired.

Regarding the expected behaviour, see here.

#5 @peterwilsoncc
3 years ago

  • Milestone changed from 6.0 to Future Release

As this lacks a patch and is need of a second opinion, I'll move it off the 6.0 milestone.

Note: See TracTickets for help on using tickets.