|
@@ -582,7 +582,7 @@ public final class CommonUtils {
|
|
|
}
|
|
|
while (htmlStr.toLowerCase().contains("<br ")) {
|
|
|
int index1 = htmlStr.toLowerCase().indexOf("<br ");
|
|
|
- int index2 = htmlStr.toLowerCase().indexOf(">", index1 + 1);
|
|
|
+ int index2 = htmlStr.toLowerCase().indexOf('>', index1 + 1);
|
|
|
htmlStr = htmlStr.substring(0, index1) + "<br/>" + htmlStr.substring(index2 + 1);
|
|
|
}
|
|
|
while (htmlStr.toLowerCase().endsWith("<br>") || htmlStr.toLowerCase().endsWith("<br/>")) {
|
|
@@ -597,7 +597,7 @@ public final class CommonUtils {
|
|
|
{//补全META标签
|
|
|
int imgIndex = indexOfRegex(htmlStr, "<((meta)|(META)) ");
|
|
|
while (imgIndex > 0) {
|
|
|
- int flag = htmlStr.indexOf(">", imgIndex);
|
|
|
+ int flag = htmlStr.indexOf('>', imgIndex);
|
|
|
if (htmlStr.charAt(flag - 1) != '/') {
|
|
|
htmlStr = htmlStr.substring(0, flag) + "/" + htmlStr.substring(flag);
|
|
|
}
|
|
@@ -608,7 +608,7 @@ public final class CommonUtils {
|
|
|
{//补全img标签
|
|
|
int imgIndex = indexOfRegex(htmlStr, "<((img)|(IMG)) ");
|
|
|
while (imgIndex > 0) {
|
|
|
- int flag = htmlStr.indexOf(">", imgIndex);
|
|
|
+ int flag = htmlStr.indexOf('>', imgIndex);
|
|
|
if (htmlStr.charAt(flag - 1) != '/') {
|
|
|
htmlStr = htmlStr.substring(0, flag) + "/" + htmlStr.substring(flag);
|
|
|
}
|