Skip to content

Commit

Permalink
Add method unwrapHtmlTag
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed Sep 9, 2014
1 parent f2fc95d commit 676d2b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.xiaoleilu</groupId>
<artifactId>hutool</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<name>hutool</name>
<description>提供最基础的工具类</description>
<url>https://github.com/looly/hutool</url>
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/xiaoleilu/hutool/HtmlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ public static String removeHtmlTag(String content, String... tagNames) {
return removeHtmlTag(content, true, tagNames);
}

/**
* 清除指定HTML标签,不包括内容<br>
* 不区分大小写
* @param content 文本
* @param tagNames 要清除的标签
* @return 去除标签后的文本
*/
public static String unwrapHtmlTag(String content, String... tagNames) {
return removeHtmlTag(content, false, tagNames);
}

/**
* 清除指定HTML标签<br>
* 不区分大小写
Expand Down

0 comments on commit 676d2b2

Please sign in to comment.