fix(测试跟踪): tapd添加图片链接失效

This commit is contained in:
chenjianxing 2022-12-21 16:34:50 +08:00 committed by jianxing
parent 739b4d2145
commit 2ffb2fa6db
1 changed files with 6 additions and 1 deletions

View File

@ -241,7 +241,12 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
if (endpoint.endsWith("/")) {
endpoint = endpoint.substring(0, endpoint.length() - 1);
}
path = " <img src=\"" + endpoint + path + "\"/>";
String format = " <img src=\"%s\"/>";
if (path.trim().startsWith("http")) {
path = String.format(format, path);
} else {
path = String.format(format, endpoint + path);
}
result = matcher.replaceFirst(path);
matcher = pattern.matcher(result);
}