IElement.Insert() strips ‌
See original GitHub issueBug Report
Description
the zero-width-non-joiner is removed by AngleSharp, when using IElement.Insert(). (using AngleSharp 0.16.0)
Steps to Reproduce
heading.Insert(AdjacentPosition.AfterBegin, $"<a name=\"{entry.Id}\">‌</a>");
Expected behavior:
I expect the html to be inserted as set. (ie. <a name="234">‌</a>
)
Actual behavior:
In the string returned from ie. .InnerHtml the ‌
is removed (ie. <a name="234"></a>
). If I replace it with
that is not removed.
Environment details: Windows 10, .Net5 (core)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Remove ‌ characters - javascript
The jQuery .text() method does a nice job of sanitizing the input, it returns text, only, and strips the rest away.
Read more >Add space-format characters to str.strip - Python discussion
strip() ( str.strip(None) ) removes the leading and trailing characters whose Unicode property White_Space is yes , but leaves invisible space ...
Read more >luatex - How to insert a specific unicode character (such as ...
What I'm stuck with is trying to figure out how to insert the ZWNJ character (a "node" in luatex speak? of what type?)...
Read more >Word delimiter token filter | Elasticsearch Guide [8.9]
Split tokens at non-alphanumeric characters. The filter uses these characters as delimiters. For example: Super-Duper → Super , Duper; Remove leading or ...
Read more >CSS Entities
Complete CSS Entity Reference ... If you use CSS to display any of these characters in HTML, you can use the CSS entity...
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 FreeTop 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
Top GitHub Comments
awesome! Thanks for the clarification!
This is not how it works. Entities are always replaced with their character representations. There are only some exclusions, see the formatter (https://github.com/AngleSharp/AngleSharp/blob/devel/src/AngleSharp/Html/HtmlMarkupFormatter.cs#L162).