We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3403d40 commit b79d87cCopy full SHA for b79d87c
enews/enews-java/article-editor/src/main/java/com/novoda/enews/ArticleEditor.java
@@ -35,11 +35,16 @@ private String generateImageUrl(ChannelHistory.Message message) {
35
}
36
37
private String generateText(ChannelHistory.Message message) {
38
- return message.getText()
+ String text = message.getText()
39
.replaceAll("<h", "h")
40
.replaceAll("/>", "")
41
.replaceAll(">", "")
42
- .replaceAll("\\?(.*)", "");
+ .replaceAll("\\?(.*)", "")
43
+ .replaceAll("(http|https)://(.*)", "");
44
+ if(text.isEmpty()) {
45
+ return "I was so excited by this #enews, I didn't have time to write anything. Check it out!";
46
+ }
47
+ return text;
48
49
50
private String generateTitle(ChannelHistory.Message message) {
0 commit comments