Skip to content

Issue with > character on IE #301

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

Open
leozzitowned opened this issue Jul 19, 2016 · 8 comments
Open

Issue with > character on IE #301

leozzitowned opened this issue Jul 19, 2016 · 8 comments

Comments

@leozzitowned
Copy link

Hi rubenv,

When I use a string that contains ">" on it, I get no translation on IE. Example:

scope.sentence = gettextCatalog.getString('Sentence with > on it')
<span ng-bind="sentence"></span>

On Chrome/Firefox, it works perfectly.

Thanks for your patience.

@SamanthaAdrichem
Copy link

SamanthaAdrichem commented Sep 19, 2016

I have the exact same issue with a different character and found out that IE converts the loaded JSON file. And changes & to &amp; so > will probably become &gt; The translation is then not found.

@SamanthaAdrichem
Copy link

That fixes it for me.

@danjarvis
Copy link

danjarvis commented Oct 12, 2016

I was hitting this issue while using the translate filter:

<span>{{'Save & Next' | translate}}</span>

If I switch to using the translate directive it will work on IE... but break on Chrome and Firefox:

<span translate>Save & Next</span>

@danjarvis
Copy link

danjarvis commented Oct 12, 2016

OK.

I just investigated this a bit further and the issue is not caused by IE / Edge converting the loaded JSON (that doesn't actually happen). The issue is that setStrings() is modifying each key if the isHTMLModified flag is set -- see here.

This was added to account for IE uppercasing tag names and re-ordering HTML attributes.

That being said, your proposed fix is the best solution for what appears to be a pretty severe issue...

@SamanthaAdrichem
Copy link

Yes, see my pull-request, which determines exactly the same, and notices that the fix isn't applied at a second location.

danjarvis added a commit to danjarvis/angular-gettext that referenced this issue Oct 12, 2016
Fixes rubenv#301
See: rubenv#312

Note: this commit / fork is just a temporary hold over to npm install
from until this is officially fixed upstream.
danjarvis added a commit to danjarvis/angular-gettext that referenced this issue Oct 12, 2016
Fixes rubenv#301
See: rubenv#312

Note: this commit / fork is just a temporary hold over to npm install
from until this is officially fixed upstream.
@bassoGeorge
Copy link

Hello,
I am also facing this issue and am in a situation where I can't use a workaround. Your fork works and fixes it but would like this to be merged upstream. Can we prioritise pull request #312? Anything I can do to help ?

Thanks

@alexeykorsakov
Copy link

Hello

I am also interested pulling request #312. The suggested fix helped me.

Thanks

@korkmaz
Copy link

korkmaz commented May 1, 2017

Hi,

#312 works for me too, It seems pull request is open for a while, Do you have a plan to merge it or Do you have another solution?

Thanks

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

6 participants