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 4
4
import javafx .scene .Parent ;
5
5
import javafxlibrary .exceptions .JavaFXLibraryNonFatalException ;
6
6
import javafxlibrary .utils .RobotLog ;
7
+ import org .apache .commons .lang .StringUtils ;
7
8
import org .w3c .dom .Document ;
8
9
import org .w3c .dom .NamedNodeMap ;
9
10
import org .w3c .dom .NodeList ;
20
21
import java .util .List ;
21
22
import java .util .Set ;
22
23
24
+ import static org .apache .commons .lang3 .StringUtils .countMatches ;
25
+
23
26
public class XPathFinder {
24
27
25
28
private StringBuilder sb ;
@@ -170,6 +173,11 @@ private void parseAttributes(Node node) {
170
173
attributeBuilder .append (att .replace ("=" , "=\" " ));
171
174
attributeBuilder .append ("\" " );
172
175
} else {
176
+ if (countMatches (att , "\" " ) > 2 ) {
177
+ att = att .replaceAll ("\" " , """ );
178
+ att = att .replaceFirst (""" , "\" " );
179
+ att = att .replaceAll (""$" , "\" " );
180
+ }
173
181
attributeBuilder .append (att );
174
182
}
175
183
} else {
You can’t perform that action at this time.
0 commit comments