Skip to content

v0.2.0

Choose a tag to compare

@dvhsh dvhsh released this 28 Sep 23:22
0b696e9

Added

  • LIMITS.nesting (100) and the too-deep lint warning for tags nested past it.

Changed

  • An unclosed [box] or [spoilerbox] renders as a box that runs to the end of what holds it (the post, or the quote or box around it), as on osu!, instead of as text. lint reports it as an unclosed-tag warning, and the node's close is null.

Fixed

  • Deeply nested tags no longer overflow the stack. A 60,000 character post of nested [quote], [box] or [list] tags, or boxes nested inside box titles, threw RangeError from render and lint in Node and Chromium. Tags nested past LIMITS.nesting (100) now stay text, and lint reports the new too-deep warning once.
  • validateImagemap (and so serializeImagemap) refuses [/imagemap] in the image URL, a link or a title. It ended the written block early, so osu! showed the imagemap as text.
  • Parsing, rendering and linting take linear time on hostile input. 60,000 characters of [box=, [c] with a close on a later line, [url] or unterminated [a= took up to 5 seconds in Node, so one post could stall a server rendering it. Close tags, newlines and box title ends are now found once per document.
  • A bare link followed by bracketed text (https://a.b[x]) leaves the brackets out, as osu! does.