In my Angular Translate string, I am using a parameter that can be in the form of <test>
. However, when this translate is displayed in a textarea, it shows up as <test>
instead of <test>
. Is there a way to ensure it appears correctly as <test>
?
The content of the Angular Translate file is:
"MESSAGE_KEY": "Display {someParam} displayed",
The message being used is:
var message = $filter('translate')('MESSAGE_KEY',
{someParam: '<test>'},
'messageformat');
When I input the message as the ng-model in the textarea, I see:
<test>
Please note:
- It is not feasible for us to use contenteditable for this purpose due to various constraints.
- We have configured the sanitization strategy as follows:
$translateProvider.useSanitizeValueStrategy('escapeParameters', 'sanitizeParameters');