diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-14 23:55:00 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-14 23:55:00 +0000 |
| commit | 8dc316c3d55cf19f36554a8b5a606f04ca49ac31 (patch) | |
| tree | 66a8a2890263dc8272b051b6e843015f53684689 /src | |
| parent | comment fix (diff) | |
| download | inkscape-8dc316c3d55cf19f36554a8b5a606f04ca49ac31.tar.gz inkscape-8dc316c3d55cf19f36554a8b5a606f04ca49ac31.zip | |
even if one declaration is broken, try to still read all others per http://www.w3.org/TR/CSS21/syndata.html#declaration; fixes bug 1266843
(bzr r2651)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcroco/cr-declaration.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libcroco/cr-declaration.c b/src/libcroco/cr-declaration.c index ba8e0c95f..530085b52 100644 --- a/src/libcroco/cr-declaration.c +++ b/src/libcroco/cr-declaration.c @@ -210,14 +210,15 @@ cr_declaration_parse_list_from_buf (const guchar * a_str, cr_parser_try_to_skip_spaces_and_comments (parser); status = cr_tknzr_peek_char (tokenizer, &c); if (status != CR_OK) { - if (status == CR_END_OF_INPUT_ERROR) + if (status == CR_END_OF_INPUT_ERROR) status = CR_OK; goto cleanup; } if (c == ';') { status = cr_tknzr_read_char (tokenizer, &c); } else { - break; + cr_tknzr_read_char (tokenizer, &c); + continue; // try to keep reading until we reach the end or a ; } important = FALSE; cr_parser_try_to_skip_spaces_and_comments (parser); @@ -225,9 +226,11 @@ cr_declaration_parse_list_from_buf (const guchar * a_str, &value, &important); if (status != CR_OK || !property) { if (status == CR_END_OF_INPUT_ERROR) { - status = CR_OK; - } - break; + status = CR_OK; // simply the end of input, do not delete what we got so far, just finish + break; + } else { + continue; // even if one declaration is broken, it's no reason to discard others (see http://www.w3.org/TR/CSS21/syndata.html#declaration) + } } cur_decl = cr_declaration_new (NULL, property, value); if (cur_decl) { |
