File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/javafxlibrary/utils/finder Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 44import javafx .scene .Parent ;
55import javafxlibrary .exceptions .JavaFXLibraryNonFatalException ;
66import javafxlibrary .utils .RobotLog ;
7+ import org .apache .commons .lang .StringUtils ;
78import org .w3c .dom .Document ;
89import org .w3c .dom .NamedNodeMap ;
910import org .w3c .dom .NodeList ;
2021import java .util .List ;
2122import java .util .Set ;
2223
24+ import static org .apache .commons .lang3 .StringUtils .countMatches ;
25+
2326public class XPathFinder {
2427
2528 private StringBuilder sb ;
@@ -170,6 +173,11 @@ private void parseAttributes(Node node) {
170173 attributeBuilder .append (att .replace ("=" , "=\" " ));
171174 attributeBuilder .append ("\" " );
172175 } else {
176+ if (countMatches (att , "\" " ) > 2 ) {
177+ att = att .replaceAll ("\" " , """ );
178+ att = att .replaceFirst (""" , "\" " );
179+ att = att .replaceAll (""$" , "\" " );
180+ }
173181 attributeBuilder .append (att );
174182 }
175183 } else {
You can’t perform that action at this time.
0 commit comments