easier way of using HTML entities
See original GitHub issueUsing innerHTML to insert the odd HTML entity such as
as described in the wiki is OK. But when HTML entities are used all over the place, this quickly becomes unwieldy. I wish there was some way to keep using the entities inline.
Is there another reason to escape all text other than prevention of XSS from user entered text? If there isn’t, I think the default of escaping everything is wrong and should be changed (if possible).
When writing plain old HTML, people are used their <tags>
being interpreted accordingly, just like their &entities;
, and the rest used as is (i.e. unescaped). I wish bel could mirror that experience.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
HTML Entities
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >HTML - Entities
HTML - Entities, Some characters are reserved in HTML and they have special meaning when used in HTML document. For example, you cannot...
Read more >Different HTML Entities with Examples
Guide to HTML Entities. Here we discuss the Introduction and different HTML entities in tabular format along with examples.
Read more >Common HTML entities used for typography
There are a number of HTML entities that come in handy when there's a need for first-rate typesetting. Many of those listed in...
Read more >Use HTML Entities to Add Special Characters to Web Pages
Use entities to display special characters. Also good for when you want to display samples of code/markup on your web page.
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 wanted to chime in on this now that the module has evolved some. I hear the safety concerns, but with the added SSR capabilities of Pelo, this would be really handy. For example, I’m formatting text, which I’ve properly sanitized, as markdown formatter. Currently to do this requires:
Up till the addition of Pelo this was cool, but when using
.toString()
for some SSR jazz, the DOM isn’t around, and the element ends up being blank. I’ve hit this a few times recently, both when working on some SSR stuff, and when creating a little static site generator with Choo. Obv loosing a big benefit of SSR when used on a page with a lot of copy.You can see this in action when visiting my site: https://jon-kyle.com/
Source here: https://github.com/jondashkyle/jon-kyle.com
Could be a great add?! 🎉 (cc: @yoshuawuyts)
added in #86