LibHTML+IRCClient: Add an escape_html_entities() helper

This simple helper escapes '<', '>' and '&' so they can be used in HTML
text without interfering with the parser.

Use this in IRCClient to prevent incoming messages from messing with
the DOM :^)
This commit is contained in:
Andreas Kling 2019-11-06 22:37:24 +01:00
commit a377e8d3f5
Notes: sideshowbarker 2024-07-19 11:20:30 +09:00
3 changed files with 19 additions and 2 deletions

View file

@ -7,3 +7,4 @@ class DocumentFragment;
RefPtr<Document> parse_html_document(const StringView&, const URL& = URL());
RefPtr<DocumentFragment> parse_html_fragment(Document&, const StringView&);
String escape_html_entities(const StringView&);