Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Ampersands in package descriptions are HTML encoded. #124

Closed
lewiscowper opened this issue Jan 22, 2016 · 3 comments
Closed

Ampersands in package descriptions are HTML encoded. #124

lewiscowper opened this issue Jan 22, 2016 · 3 comments
Labels

Comments

@lewiscowper
Copy link

screen shot 2016-01-22 at 13 13 47

I'm not sure exactly where the problem lies, I found the following function in the website repository: https://github.com/npm/newww/blob/c4818328d5e936f359b587d340d8a3b821026672/presenters/package.js#L173

which led me to:

https://github.com/npm/marky-markdown/blob/master/lib/packagize.js#L48

There's a lot of conditional logic I'm not familiar with used here, but I'm assuming that at some point we return the description as-is, instead of un-encoding it and rendering it appropriately.

@revin
Copy link
Collaborator

revin commented Jan 22, 2016

If I run marky standalone against this README, the description renders correctly, so I think this is a newww bug. I'm far from a handlebars expert, but I think the issue is that once marky has processed the description, https://github.com/npm/newww/blob/master/templates/package/show.hbs#L13 is double encoding it, so {{{description}}} (with three sets of braces rather than two) is the fix.

@ashleygwilliams
Copy link
Contributor

lol i was just about to say that
screen shot 2016-01-22 at 10 36 30 am

@ashleygwilliams
Copy link
Contributor

closing and refiling on newww

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

No branches or pull requests

3 participants