-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a util classes to validate empty html based description
- Loading branch information
1 parent
fe4bd0d
commit 1b9b0b6
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/main/java/de/imi/mopat/helper/controller/HtmlUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.imi.mopat.helper.controller; | ||
|
||
import java.util.regex.Pattern; | ||
|
||
public class HtmlUtils { | ||
private static final Pattern HTML_TAG_PATTERN = Pattern.compile("<[^>]*>"); | ||
|
||
public static String removeHtmlTags(String input) { | ||
if (input == null) { | ||
return null; | ||
} | ||
return HTML_TAG_PATTERN.matcher(input).replaceAll(""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters