Skip to content

Commit

Permalink
'#43 Some url references are not insider delimiters
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdalla committed Feb 6, 2024
1 parent bd5f462 commit 2c83cec
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,13 @@ private void addMetadata(Item subItem, String property, String value) {
if (refpos >= 0) {
String refFileStr = value.substring(refpos + sizeTag);// from end of "href=" till end
String strDelimiter = refFileStr.substring(0, 1); // read used string delimiter (quote or double quote)
int end = refFileStr.length();
if (strDelimiter.equals("'") || strDelimiter.equals("\"")) {
end = refFileStr.indexOf(strDelimiter, 2);
}

try {
refFileStr = refFileStr.substring(1, refFileStr.indexOf(strDelimiter, 2)); // to end string delimiter
refFileStr = refFileStr.substring(1, end); // to end string delimiter
if (refFileStr.startsWith("." + File.pathSeparator)) {
refFileStr = reportDumpPath + File.pathSeparator + refFileStr.substring(1);
}
Expand Down

0 comments on commit 2c83cec

Please sign in to comment.