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

Apostrophe character doesn't display as intended in post title #13985

Open
bsmth opened this issue Dec 6, 2023 · 7 comments
Open

Apostrophe character doesn't display as intended in post title #13985

bsmth opened this issue Dec 6, 2023 · 7 comments
Labels
Bug 🐛 Something's not working the way it should

Comments

@bsmth
Copy link

bsmth commented Dec 6, 2023

Description

In the "Life@Mozilla" section, there is a feed of articles. The title of an article uses an apostrophe, but is displayed as the unicode decimal ’ (https://www.codetable.net/decimal/8217) instead.

Steps to reproduce

  1. Navigate to https://www.mozilla.org/en-US/careers/
  2. Scroll to "Life@Mozilla"

image

Expected result

The article title should be:

Building connections at the ’23 All Hands 

Actual result

Article title is

Building connections at the ’23 All Hands

Environment

  • Fx Nightly 122.0a1 (2023-12-05) (64-bit)
  • macOS 14.1.2 (23B92)
@bsmth bsmth added the Bug 🐛 Something's not working the way it should label Dec 6, 2023
@craigcook
Copy link
Member

This is how it's encoded in the RSS feed. We may need to filter when it's displayed on our end to make sure entities are rendered correctly.

@Ayushsunny
Copy link
Contributor

@bsmth I want to work on this issue.

@bsmth
Copy link
Author

bsmth commented Feb 22, 2024

@bsmth I want to work on this issue.

Thanks @Ayushsunny - I don't think anyone is working on this, so I believe you can open a PR to fix it, see https://github.com/mozilla/bedrock/blob/main/.github/CONTRIBUTING.md for info or ask again here if you're stuck 👍🏻

@Ayushsunny
Copy link
Contributor

@bsmth I want to work on this issue.

Thanks @Ayushsunny - I don't think anyone is working on this, so I believe you can open a PR to fix it, see https://github.com/mozilla/bedrock/blob/main/.github/CONTRIBUTING.md for info or ask again here if you're stuck 👍🏻

Hey @bsmth, I could not find the


where this excerpt is coming from?

@bsmth
Copy link
Author

bsmth commented Feb 23, 2024

Thanks for flagging it. I don't know this codebase at all, but it looks like you're on the right track. It's the <h2> ->

<h2 class="mzp-c-card-title">{{ post.title }}</h2>

The other tags pipe to safe, indeed: https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#std-templatefilter-safe

Maybe this is the fix, but needs maintainer eyes because it looks very intentional that excerpts are piped to safe but not titles:

 <h2 class="mzp-c-card-title">{{ post.title | safe }}</h2> 

@Ayushsunny
Copy link
Contributor

Ayushsunny commented Feb 25, 2024

@alexgibson what do you have to say about this issue?

@alexgibson
Copy link
Member

@Ayushsunny Craig already mentioned the likely problem and solution here above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something's not working the way it should
Projects
None yet
Development

No branches or pull requests

4 participants