ladybird/Libraries/LibHTML/Parser/HTMLParser.h
Andreas Kling a377e8d3f5 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 :^)
2019-11-06 22:40:01 +01:00

10 lines
305 B
C++

#pragma once
#include <AK/NonnullRefPtr.h>
#include <LibHTML/DOM/Document.h>
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&);