How to show special character like '&' in placeholder attribute?
See original GitHub issueSo the text is ‘Cities & Suburbs’ in json. And I want to show exactly that in HTML for placeholder attribute.
I tried to do the followings but still got Cities & Suburbs
on the screen
<input translate translate-attr-placeholder="{{translationId}}"/>
OR
<input placeholder="{{translationId | translate}}"/>
I know one solution is to change $translateProvider.useSanitizeValueStrategy('sanitize');
to $translateProvider.useSanitizeValueStrategy();
but this will make the application vulnerable.
Any other suggestions?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
php - Display special characters on input placeholder with ...
I need to display a special character in the ...
Read more >placeholder - CSS: Cascading Style Sheets - MDN Web Docs
The ::placeholder CSS pseudo-element represents the placeholder text in an or element.
Read more >HTML input placeholder Attribute - W3Schools
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short...
Read more >Don't Use The Placeholder Attribute - Smashing Magazine
The presence of a placeholder attribute won't be flagged by automated accessibility checking software. However, this doesn't necessarily mean ...
Read more >Expression attribute names in DynamoDB - AWS Documentation
An expression attribute name is a placeholder that is used in an Amazon DynamoDB ... Reserved words; Attribute names containing special characters ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just turn off the sanitize strategy 'cos it is totally broken:
Hi artuska - Could you clarify what is the impact of changing the sanitize strategy?