Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to email em dash #2818

Closed
1 task done
tscrip opened this issue Feb 22, 2018 · 3 comments
Closed
1 task done

Unable to email em dash #2818

tscrip opened this issue Feb 22, 2018 · 3 comments
Assignees
Labels
Fixed in v17.0 Topic: Communications Related to Rock Communications: Email, SMS, MMS, Push Notifications, etc. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@tscrip
Copy link

tscrip commented Feb 22, 2018

Prerequisites

Description

We are trying to send an email with some external content. The content occasionally has an em or en dash. When an email is generated from Rock, em dashed are always converted to a regular dash. I am not sure if it is strictly limited to em dashes, but that is all that I have tested with.

Troubleshooting steps taken:

  • Tried with the dash formatted like the following: —``—``—
  • Tried sending through MailGun and SendGrid
  • Tried receiving at both Outlook and Gmail
  • Examined data in Communication table and can confirm it is stored in correct format

Steps to Reproduce

  1. Open New communication
  2. Select recipient and template
  3. Enter this in the body of the email: HTML: &mdash; <br/>Decimal: &#8212; <br/>Hex: &#x2014;
  4. Click send
  5. Review results in mail client

Expected behavior:

em dash is render correctly

Actual behavior:

em dash is being rendered as regular dash

Versions

  • Rock Version: 6.10, 7.2
  • Client Culture Setting: en-US
@jgrabrian
Copy link

Reviewed logs in Mailgun after testing and confirmed that it received the message with a regular dash.

@garrettjohnson garrettjohnson added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Communications Related to Rock Communications: Email, SMS, MMS, Push Notifications, etc. labels Feb 23, 2018
@jonedmiston jonedmiston added Status: Available The core team has made this available for the community to fix. (was: Status: Available) Priority: Low Affects a small number of Rock installations and will not be noticed by most users. labels Feb 23, 2018
@jonedmiston jonedmiston added the Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. label Aug 3, 2018
@MichaelAllen
Copy link
Contributor

This appears to affects all communication transports, not just Email. However, I'm not sure if it is a bug or intended behavior.

In Rock.Communication.TransportComponent the ResolveText method is calling Rock.Extension.ReplaceWordChars( ) to strip "special" characters (em dash included). This appears to be designed to cleanup text pasted in from MS word or similar.

I see 2 options for fixing this, if it is indeed a bug.

  1. Don't "cleanup" the communication body, take whatever the user types.
    Removing this line would accomplish that for all types of communications. (Alternative: add a conditional to only cleanup SMS messages since they have a limited charset.)

    value = value.ReplaceWordChars();

  2. Remove "em dash" and "en dash" from the list of things that get cleaned up. (Still clean up other things like smart quotes and ellipses)
    Removing these 2 lines would accomplish that:

    // dashes
    s = Regex.Replace( s, "[\u2013\u2014]", "-" );

    (Not sure where else this method gets used, so this solution may have unintended consequences.)
    It is probably better to make a new cleanup method that doesn't remove dashes and replace the line referenced in option 1 with a call to that method instead.

I'm willing to submit a PR for either solution, I'm just not sure which is the better option.

@jonedmiston
Copy link
Member

This issue is a duplicate of: #2818

We will correct and test the fix for the characters described in #2818 when fixing this issue.

@jonedmiston jonedmiston self-assigned this Sep 26, 2023
@jonedmiston jonedmiston added Fixed in v17.0 and removed Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Status: Available The core team has made this available for the community to fix. (was: Status: Available) Priority: Low Affects a small number of Rock installations and will not be noticed by most users. labels Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v17.0 Topic: Communications Related to Rock Communications: Email, SMS, MMS, Push Notifications, etc. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

8 participants