Page MenuHomePhabricator

librsvg handles errors in path data incorrectly
Open, MediumPublic

Description

There's a discrepancy between how common browsers and librsvg render SVG files, which have path data with missing command parameters.

The path element implementation notes specify that "the SVG user agent shall render a ‘path’ element up to (but not including) the path command containing the first error in the path data specification". https://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes
Librsvg instead defaults missing parameters to zero and continues rendering.

Example: https://commons.wikimedia.org/wiki/File:Incorrect_path_error_handling.svg