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

HTML entities not decoded? #798

Open
FezVrasta opened this issue Jan 30, 2018 · 10 comments · Fixed by #801
Open

HTML entities not decoded? #798

FezVrasta opened this issue Jan 30, 2018 · 10 comments · Fixed by #801

Comments

@FezVrasta
Copy link

FezVrasta commented Jan 30, 2018

I can't understand why the HTML entities are not properly rendered:

image

Repro:
https://github.com/FezVrasta/example

Specific file: https://github.com/FezVrasta/example/blob/master/lib/components/Button/Readme.md

@sapegin
Copy link
Member

sapegin commented Jan 31, 2018

No idea ;-/ I guess it's a bug somewhere in Styleguidist, but it needs some debugging.

Feel free to debug and / or fix if you have time.

@nitinkh
Copy link

nitinkh commented Jan 31, 2018

I think this should work fine:

<button className="button" style={styles} onClick={onClick} disabled={disabled} dangerouslySetInnerHTML={{__html: children}}>
</button>

@nitinkh
Copy link

nitinkh commented Jan 31, 2018

If it works let me know will send a pull request

@lgordey
Copy link
Contributor

lgordey commented Feb 1, 2018

@sapegin I guess I found failing part - #801

@vysinsky
Copy link
Contributor

Hello, it seems to be broken again in 7.0.7 (also in 7.0.5). I have this list directly in MD file (not in component example)

Make sure to include polyfills for following JS features (if you need to support browsers which do not support them):

- fetch - recommended: [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch)
- promises - recommended: [core-js/es6/promise](https://github.com/zloirock/core-js#ecmascript-6-promise)
- Map - recommended: [core-js/es6/map](https://github.com/zloirock/core-js#map)
- Set - recommended: [core-js/es6/set](https://github.com/zloirock/core-js#set)
- ES6 array functions - recommended [core-js/es6/array](https://github.com/zloirock/core-js#ecmascript-6-array)
- requestAnimationFrame (for IE < 10) - recommended [raf](https://www.npmjs.com/package/raf)

Styleguide renders (for IE < 10) as (for IE &lt; < 10).

@sapegin sapegin reopened this Apr 20, 2018
@vysinsky
Copy link
Contributor

I've just checked and last version it is working correctly is 6.0.33.

@lgordey
Copy link
Contributor

lgordey commented Apr 22, 2018

This issue was about buble bugs related to bublejs/buble#104 and bublejs/buble#107
It should correctly work in 6.2.4 after we updated to buble@0.19.2 here #815.

@vysinsky
Copy link
Contributor

I've checked 6.2.4. Still does not work (buble 0.19.3 is installed). Should I report directly to buble?

@lgordey
Copy link
Contributor

lgordey commented Apr 23, 2018

I guess at first we should find the real problem.
Could you make a demo with the last version where it works and broken one?

@vysinsky
Copy link
Contributor

vysinsky commented Apr 23, 2018

Sure, there is a demo: https://github.com/vysinsky/styleguide-demo

There are two branches:

  • master with latest styleguide does not work
  • working - styleguide 6.0.33 is used

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

Successfully merging a pull request may close this issue.

5 participants