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
Andreas Kling
ac2cc7d78f
LibHTML: Make parse_html_document() return a RefPtr
...
Parsing might not always succeed, so let's have a way to signal errors.
2019-11-06 20:54:50 +01:00
Andreas Kling
794f2d5645
LibHTML: Rename parse_html() => parse_html_document()
2019-11-06 20:52:18 +01:00
Andreas Kling
f5cf8d4ad8
Revert "LibHTML: Rename parse_html() => parse_html_document()"
...
This reverts commit f6439789db
.
Oops, I committed unrelated changes here, let me clean that up..
2019-11-06 20:51:07 +01:00
Andreas Kling
f6439789db
LibHTML: Rename parse_html() => parse_html_document()
2019-11-06 20:31:56 +01:00
Andreas Kling
635717ed0f
LibHTML: Add parse_html_fragment()
...
This function parses a partial DOM and returns it wrapped in a document
fragment node (DocumentFragment.)
There are now two entrances into the HTML parser, one for parsing full
documents, and one for parsing fragments. Internally the both wrap the
same parsing function.
2019-11-06 20:30:39 +01:00
Andreas Kling
edbf09ea29
LibHTML: Make the CSS and HTML parsers take StringViews
...
This allows us to avoid unnecessary making unnecessary String copies of
all the source text.
2019-10-07 19:11:33 +02:00
Andreas Kling
66caa7af2b
LibHTML: Optionally pass document URL to the HTML parser
...
This makes the document URL available to all the parse_attributes()
callbacks, in case they need it for anything.
2019-10-06 21:13:24 +02:00
Andreas Kling
04b9dc2d30
Libraries: Create top level directory for libraries.
...
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00