Skip to content

Release 0.2.1

Compare
Choose a tag to compare
@yorickpeterse yorickpeterse released this 02 Mar 21:15

Proper HTML serializing support for script tags

When serializing an HTML document back to HTML (as a String) the contents of
<script> tags are serialized correctly. Previously XML unsafe characters
(e.g. <) would be converted to XML entities, which results in invalid
Javascript syntax. This has been changed so that <script> tags in HTML
documents don't have their contents converted, ensuring proper Javascript
syntax upon output.

See commit 874d712 and issue
#79 for more information.

Proper lexing support for script tags

When lexing HTML documents the XML lexer is now capable of lexing the contents
of <script> tags properly. Previously input such as <script>x >y</script>
would result in incorrect tokens being emitted. See commit
ba2177e and issue
#70 for more information.

Element Inner Text

When setting the inner text of an element using Oga::XML::Element#inner_text=
all child nodes of the element are now removed first, instead of only text
nodes being removed.

See #64 for more information.

Support for extra XML entities

Support for encoding/decoding extra XML entities was added by Dmitry
Krasnoukhov. This includes entities such as &#60, &#34, etc. See commit
26baf89 for more information.

Support for inline doctypes with newlines in IO input

The XML lexer (and thus the parser) can now handle inline doctypes containing
newlines when using an IO object as the input. For example:

<!DOCTYPE html[foo
bar]>

Previously this would result in incorrect tokens being emitted by the lexer. See
commit cbb2815 for more information.