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

escaped characters are wrongly translated into html. e.g. < becomes > while it shouldn't be #57

Closed
Abdelkrim opened this issue Aug 24, 2013 · 3 comments

Comments

@Abdelkrim
Copy link

This piece of html

<p>Note the lack of the <code>&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.</p>

<p>&copy; Company 2013</p>

Becomes, by using http://html2jade.aaron-powell.com

    p
    | Note the lack of the
      code <meta name="viewport" content="width=device-width, initial-scale=1.0">
      | , which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.
    p © Company 2013

it should be

    p
    | Note the lack of the
      code **&lt;**meta name="viewport" content="width=device-width, initial-scale=1.0"**&gt;**
      | , which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.
    p **&copy;** Company 2013
@donpark
Copy link
Owner

donpark commented Aug 24, 2013

Fix actually over-encodes, encoding common characters like period and comma, but character entity encoding module I'm using is not configurable. In return for tediously encoded output, some safety is gained so it's an even trade I think.

@Abdelkrim
Copy link
Author

Don, i understand, it is tedious to check the complete HTML we are translating against the jade file

Thanks for the swift answer

Don Park [email protected] wrote:

Fix actually over-encodes, encoding common characters like period and comma, but character entity encoding module I'm using is not configurable. In return for tediously encoded output, some safety is gained so it's an even trade I think.


Reply to this email directly or view it on GitHub:
#57 (comment)

@donpark
Copy link
Owner

donpark commented Aug 24, 2013

You're welcome. Issue report caught me at the right time (weekend) and I figured you guys ran into the problem in midst of a large conversion job.

Please do let me know if there are any corner cases I didn't catch with this fix. Thx.

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

2 participants