From 179f693ee0682c1e900f9047dfe67969c09a52f3 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 14 Nov 2015 01:55:03 +0100 Subject: [PATCH] tdf#43257 SVG: Id value can contain other characters than alphanumerics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ie: "graph-1", "graph_1", "graph.1", etc... Besides, modify !( str_p("'") | str_p("\"") ) condition as the 'fill' attribute can be defined as fill="url('#graph1')" but not as fill="url("#graph1")" Change-Id: I7fb2c5b61487214ab02b207ad64d29bb2a1e107a Reviewed-on: https://gerrit.libreoffice.org/19961 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- filter/source/svg/parserfragments.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx index 1d9cc85d559f..ec01fdf7da57 100644 --- a/filter/source/svg/parserfragments.cxx +++ b/filter/source/svg/parserfragments.cxx @@ -556,9 +556,9 @@ bool parsePaintUri( std::pair& o_rPaintUri, const bool bRes = parse(sPaintUri, // Begin grammar ( - str_p("url(") >> !( str_p("'") | str_p("\"") ) >> ("#") >> - (+alnum_p)[assign_a(o_rPaintUri)] >> - !( str_p("'") | str_p("\"") ) >> str_p(")") >> + str_p("url(") >> !( str_p("'") ) >> ("#") >> + (+(anychar_p - (str_p("'") | str_p(")"))))[assign_a(o_rPaintUri)] >> + !( str_p("'") ) >> str_p(")") >> *( str_p("none")[assign_a(io_rColor.second,false)] | str_p("currentColor")[assign_a(io_rColor.second,true)] | ColorGrammar(io_rColor.first)