Skip to content

Dash types different in front-end and back-end output. #12860

@danieljwonder

Description

@danieljwonder

Describe the bug
Typing - – — on the backend shows three different lengths, but on the front end, the first two appear as equal length characters. Using HTML entities seems to create different types of dashes again.

To Reproduce
Steps to reproduce the behavior:

  1. Go to post editor and type - -⎇ -⎇ ⇧ - into a paragraph block.
  2. Type ‐ – — ― into a Custom HTML block.
  3. View difference between front end and back end.

Expected behavior
Described above and below.

Screenshots
It seems as if maybe Gutenberg converts manually typed dashes and em dashes into en-dashes? The list below shows the steps I took and the code output below was copied from the front end page on brand new installation using WP 5.0.1 and 2019 Theme.

  • In the first line I manually typed - – — into a paragraph block (which the editor also tried to turn into a list block)
  • In the second line I used ‐ – — ―
<div class="entry-content">	
Manual Typing (first two characters appear to become the same):
– – —
HTML Entities 
‐ – — ―
</div>

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome / Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable[Type] FeedbackIssues that relate purely to feedback on a feature that isn't necessarily actionable[Type] QuestionQuestions about the design or development of the editor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions