grunt-angular-gettext
grunt-angular-gettext copied to clipboard
export should automatic convert special chars
https://github.com/rubenv/angular-gettext/issues/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:
- creating a fake dom - maybe it will create better results (https://github.com/andreasgal/dom.js/)
- create converter which just replace the problematic characters
- I tried to figure out which characters the javascript converting and it seems like it only convert the next chars:
& <>
- I tried to figure out which characters the javascript converting and it seems like it only convert the next chars:
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?
yes
On Sun, Nov 24, 2013 at 3:15 PM, Ruben Vermeersch [email protected]:
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/rubenv/grunt-angular-gettext/issues/14#issuecomment-29155094 .
see
$("<div>bens & jerry</div>").html()
``
even in the github console..