Ver código fonte

注释 StringUtil#txtToHtml 方法的最后一行代码, 存在 bug

reghao 1 ano atrás
pai
commit
cffcf06a55

+ 2 - 2
web/src/main/java/cn/reghao/devops/web/util/StringUtil.java

@@ -50,8 +50,8 @@ public class StringUtil {
         String converted = builder.toString();
         String str = "(?i)\\b((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\".,<>?«»“”‘’]))";
         Pattern patt = Pattern.compile(str);
-        Matcher matcher = patt.matcher(converted);
-        converted = matcher.replaceAll("<a href=\"$1\">$1</a>");
+        //Matcher matcher = patt.matcher(converted);
+        //converted = matcher.replaceAll("<a href=\"$1\">$1</a>");
         return converted;
     }
 }