Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8ce149

Browse files
committed
fix: npe
1 parentb3389ff commitd8ce149

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/main/java/com/github/doc/util/StringUtil.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
packagecom.github.doc.util;
22

3+
importorg.apache.commons.lang3.StringUtils;
4+
35
/**
46
* @author wangdongbo
57
* @since 2020/3/24.
68
*/
79
publicclassStringUtil {
810

911
publicstaticStringencodeStr(Stringcontent) {
12+
if (StringUtils.isBlank(content)) {
13+
returncontent;
14+
}
1015
returncontent.replace("<","&#60;").replace(">","&#62;");
1116
}
1217

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp