diff options
Diffstat (limited to 'src/svg/svg-color.cpp')
| -rw-r--r-- | src/svg/svg-color.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp index 9040d6e43..a8e24c311 100644 --- a/src/svg/svg-color.cpp +++ b/src/svg/svg-color.cpp @@ -454,7 +454,11 @@ sp_svg_create_color_hash() return colors; } - +/* + * Some discussion at http://markmail.org/message/bhfvdfptt25kgtmj + * Allowed ASCII first characters: ':', 'A'-'Z', '_', 'a'-'z' + * Allowed ASCII remaining chars add: '-', '.', '0'-'9', + */ bool sp_svg_read_icc_color( gchar const *str, gchar const **end_ptr, SVGICCColor* dest ) { bool good = true; @@ -484,11 +488,14 @@ bool sp_svg_read_icc_color( gchar const *str, gchar const **end_ptr, SVGICCColor } if ( !g_ascii_isalpha(*str) - && ( !(0x080 & *str) ) ) { + && ( !(0x080 & *str) ) + && (*str != '_') + && (*str != ':') ) { // Name must start with a certain type of character good = false; } else { - while ( g_ascii_isdigit(*str) || g_ascii_isalpha(*str) || (*str == '-') ) { + while ( g_ascii_isdigit(*str) || g_ascii_isalpha(*str) + || (*str == '-') || (*str == ':') || (*str == '_') || (*str == '.') ) { if ( dest ) { dest->colorProfile += *str; } |
