Forem: Ampersand is not escaped on Twitter share from the hamburger menu

Created on 11 Jul 2019  路  3Comments  路  Source: forem/forem

Describe the bug

Ampersand is not escaped on Twitter share

To Reproduce

  1. Open this post
  2. Select share option "..."
  3. Select Share to Twitter

It will open a tab with a tweet "101 Tips For Being A Great Programmer ( instead of "101 Tips For Being A Great Programmer (& Human)" by @EmmaWedekind #DEVcommunity https://dev.to/emmawedekind/101-tips-for-being-a-great-programmer-human-36nl.

Expected behavior
It should open a tab with a tweet "101 Tips For Being A Great Programmer (& Human)" by @EmmaWedekind #DEVcommunity https://dev.to/emmawedekind/101-tips-for-being-a-great-programmer-human-36nl.

good first issue bug

All 3 comments

@vepo what browser are you using? Because with Firefox 68 the share works correctly.

Screenshot_2019-07-11 Post a Tweet on Twitter

I select other way to share it. Not direct click on the Twitter icon. I was thinking if I share it through twitter or Linkedin.

Already updated the issue

I see the bug, there's a difference in how the URL is composed in the Twitter button in the sidebar - https://github.com/thepracticaldev/dev.to/blob/master/app/views/articles/_actions.html.erb#L17 - and the "Share to Twitter" in the hamburger menu - https://github.com/thepracticaldev/dev.to/blob/master/app/views/articles/_actions.html.erb#L62 (the second one is the wrong one).

Great catch!

Was this page helpful?
0 / 5 - 0 ratings