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

Angular Translate automatically HTML escape all string fields #1214

Closed
Kmaschta opened this issue Sep 28, 2016 · 0 comments
Closed

Angular Translate automatically HTML escape all string fields #1214

Kmaschta opened this issue Sep 28, 2016 · 0 comments

Comments

@Kmaschta
Copy link
Contributor

Description

Since angular-translate is installed on ng-admin, all string fields are HTML escaped.

It is caused by the line $translateProvider.useSanitizeValueStrategy('sanitize'); in config/translate.js.

The angular-translate's documentation recommand to set the sanitize strategy to strategy but we want to be able to switch it off.

Steps to Reproduce

You have an API endpoint that serve this entity:

{
    "id": 42,
    "name": "TP & SP"
}

And a ng-admin config as following:

entity.listView().fields([
    nga.field('id', 'number'),
    nga.field('name', 'string'),
]);

Expected behavior:

field value
id 42
name TP & SP

Actual behavior:

field value
id 42
name TP & SP
Kmaschta added a commit that referenced this issue Sep 28, 2016
Disable default HTML escape from angular-translate

Fix #1214
Kmaschta added a commit that referenced this issue Sep 29, 2016
Disable default HTML escape from angular-translate

Fix #1214
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

1 participant