public class TextTransfromUtils extends Object
| Constructor and Description |
|---|
TextTransfromUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
convertFileNameAnchorHTML(String url) |
protected static String |
convertHashtagsAnchorHTML(String escapedFeedText,
List<String> hashtags)
convert the hashtag in HTML anchor and also Encode the params Base64
|
static String |
escapeHtml(String html)
Escape an html string.
|
protected static String |
escapeHtmlAndTransformUrl(String html)
Escape an html string.
|
protected static String |
extractURL(String feedText)
utility method that extract an url ina text when you paste a link
|
protected static List<String> |
getHashTags(String postText)
utility method that extract the hashtags from a text
|
protected static String |
getImageUrlFromSrcAttribute(URL pageURL,
String srcAttr)
There are several ways to refer an image in a HTML, this method use an heuristic to get the actual image url
|
protected static String |
replaceAmpersand(String toReplace) |
protected static String |
transformUrls(String feedText)
utility method that convert a url ina text in a clickable url by the browser
and if the user has just pasted a link, converts the link in: shared a link
|
protected static String convertFileNameAnchorHTML(String url)
preview - protected static List<String> getHashTags(String postText)
postText - protected static String convertHashtagsAnchorHTML(String escapedFeedText, List<String> hashtags)
escapedFeedText - hashtags - protected static String escapeHtmlAndTransformUrl(String html)
html - the html string to escapeprotected static String extractURL(String feedText)
feedText - protected static String getImageUrlFromSrcAttribute(URL pageURL, String srcAttr)
pageURL - the urlsrcAttr - the content of the img src attributeprotected static String transformUrls(String feedText)
feedText - Copyright © 2016. All Rights Reserved.