grunt-angular-gettext icon indicating copy to clipboard operation
grunt-angular-gettext copied to clipboard

export should automatic convert special chars

Open AlmogBaku opened this issue 11 years ago • 3 comments
trafficstars

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:

  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: & <>

AlmogBaku avatar Nov 24 '13 12:11 AlmogBaku

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?

rubenv avatar Nov 24 '13 13:11 rubenv

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 .

AlmogBaku avatar Nov 24 '13 13:11 AlmogBaku

see

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

even in the github console..

AlmogBaku avatar Nov 24 '13 13:11 AlmogBaku