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

Title bugs #3259

Closed
Tapao-NonSen opened this issue Jan 11, 2022 · 2 comments · Fixed by #3264
Closed

Title bugs #3259

Tapao-NonSen opened this issue Jan 11, 2022 · 2 comments · Fixed by #3264
Milestone

Comments

@Tapao-NonSen
Copy link

Bug Report

Current Behavior
A clear and concise description of the behavior.

Steps to Reproduce

  1. Create some discussion include quot in the title "
  2. Now you got it

Expected Behavior
Normal title
Input: "welcome"
Output: "welcome" not "welcome"

Screenshots
https://imgur.com/hqbFO9h

@clarkwinkelmann
Copy link
Member

clarkwinkelmann commented Jan 16, 2022

The problem appears to be related to this change askvortsov1/rich-icu-message-formatter@7d0a31c

The characters &<>"' are replaced with HTML entities. But both Mithril and document.title are unable to deal with them.

The unit tests in askvortsov/rich-icu-message-formatter don't cover Mithril through .rich() and I'm not even sure where to add those tests in a way that makes sense. I'm really not sure why this change was made since it's only tested against a custom formatter implemented just for the tests.

Paging @askvortsov1 for help.

Edit: a simpler example to show the issue

app.translator.trans('core.forum.post_stream.time_lapsed_text', {period: '"test"'})
Array [ "&quot;test&quot;", " later" ]

Expected: quotes should not be HTML entities in output.

@askvortsov1
Copy link
Sponsor Member

Opened askvortsov1/rich-icu-message-formatter#1 to fix this, would appreciate review from @flarum/core before I merge, release, and bump core's deps in case there's anything I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants