Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

useSanitizeValueStrategy('sanitize') break accented chars #1205

Closed
ghost opened this issue Sep 10, 2015 · 1 comment
Closed

useSanitizeValueStrategy('sanitize') break accented chars #1205

ghost opened this issue Sep 10, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 10, 2015

Hello, I am usng partialLoader:

        $translateProvider.useLoader('$translatePartialLoader', {
            urlTemplate: STATIC_ROOT_PATH + 'i18n/{part}-{lang}.json'
        });
        $translateProvider.useSanitizeValueStrategy('sanitize');
        $translateProvider.preferredLanguage(LANG);

        $translatePartialLoaderProvider.addPart('hello');

useSanitizeValueStrategy makes "KẾT QUẢ" into K&#7871 ;T QU&#7843 ;

commenting it out solves the problem but giving a warning in Chrome console which sounds scary:

pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details.

thank you for contributing such a great plugin

@knalli
Copy link
Member

knalli commented Sep 13, 2015

Duplicate #1101 -- see also solutions and workarounds.

@knalli knalli closed this as completed Sep 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant