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

Add HTML entity support to Slang #39

Open
donovanglover opened this issue Jan 30, 2018 · 2 comments
Open

Add HTML entity support to Slang #39

donovanglover opened this issue Jan 30, 2018 · 2 comments

Comments

@donovanglover
Copy link

Hello,

First of all, thank you for spending the time to create Slang! I've used Haml in the past and personally enjoy how Slang differs from it (I hope that doesn't change anytime soon!).

As I was playing around with Slang, I noticed that the ampersand symbol (&) always gets converted to &. This doesn't work so well when you want to use HTML entities like © and €.

Input: €
Expected output: €
Actual output: €

Would love to have some feedback on this!

@jeromegn
Copy link
Owner

This could be an issue with Crystal itself. It does not support ignoring these when escaping HTML.

For instance, they've added support to unescape all the HTML5 entities, but not the other way around: crystal-lang/crystal#5055

It sounds like the reverse may be doable and desirable.

@reiswindy
Copy link

Faced the same issue when using ©
I'm using this workaround in the meantime and so far it seems to work.

div.copyright
  span == "©" 
    | #{Time.now.year}

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

No branches or pull requests

3 participants