]> granicus.if.org Git - graphviz/commit
fix: correctly handle HTML content ending in ]
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Mar 2021 03:04:27 +0000 (20:04 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 29 Mar 2021 04:00:27 +0000 (21:00 -0700)
commitd745ee64e34e84753bb20960858aed4317448f01
tree26f0c8294609d7326d8fab6a5388827783c62348
parent6a3813466fa1c3ce02b0c627d3848bcbbee4b623
fix: correctly handle HTML content ending in ]

As described in the source comment in this commit, expat attempts to recognize
CDATA section enders which results in some internal buffering that Graphviz did
not anticipate. Specifically, any HTML content ending in "]" or "]]" would be
parsed with these characters truncated. The next call to expat would flush this
buffered data, resulting in Graphviz believing the next content was malformed.

For example, the content "my label]]]" would be parsed as the text "my label]".
The next call to expat would return "]]" prepended to whatever was then being
parsed.

Fixes #1893.
CHANGELOG.md
lib/common/htmllex.c
rtest/test_regression.py