
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 :^)
10 lines
305 B
C++
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&);
|