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

export should automatic convert special chars #14

Open
AlmogBaku opened this issue Nov 24, 2013 · 3 comments
Open

export should automatic convert special chars #14

AlmogBaku opened this issue Nov 24, 2013 · 3 comments

Comments

@AlmogBaku
Copy link

rubenv/angular-gettext#23

In continue to this issue- I think the exporter should automatic convert special chars that the javascript-engine convert..

var p=document.createElement("p");
p.innerHTML='privacy policy & terms of use.';
console.log(p.innerHTML);
// Result: "privacy policy & terms of use."

Possible solutions:

  1. creating a fake dom - maybe it will create better results (https://github.com/andreasgal/dom.js/)
  2. create converter which just replace the problematic characters
    1. I tried to figure out which characters the javascript converting and it seems like it only convert the next chars: & <>
@rubenv
Copy link
Owner

rubenv commented Nov 24, 2013

creating a fake dom - maybe it will create better results (https://github.com/andreasgal/dom.js/)

Most of these depend on contextify, which give a lot of problems to install on Windows. We're currently using cheerio because it's 100% JS and doesn't give us those pains.

Now, it's an interesting problem you're seeing there. Does the same thing happen with jQuery loaded?

@AlmogBaku
Copy link
Author

yes

On Sun, Nov 24, 2013 at 3:15 PM, Ruben Vermeersch
notifications@github.comwrote:

creating a fake dom - maybe it will create better results (
https://github.com/andreasgal/dom.js/)

Most of these depend on contextify, which give a lot of problems to
install on Windows. We're currently using cheerio because it's 100% JS and
doesn't give us those pains.

Now, it's an interesting problem you're seeing there. Does the same thing
happen with jQuery loaded?


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-29155094
.

@AlmogBaku
Copy link
Author

see

$("<div>bens & jerry</div>").html()
``

even in the github console..

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