Package org.gcube.portal.socialmail
Class Utils
- java.lang.Object
-
- org.gcube.portal.socialmail.Utils
-
public class Utils extends Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringescapeHtml(String html)Escape an html string.protected static StringescapeHtmlAndTransformUrl(String html)Escape an html string.protected static StringtransformUrls(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
-
-
-
Method Detail
-
escapeHtmlAndTransformUrl
protected static String escapeHtmlAndTransformUrl(String html)
Escape an html string. Escaping data received from the client helps to prevent cross-site script vulnerabilities.- Parameters:
html- the html string to escape- Returns:
- the escaped string
-
transformUrls
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- Parameters:
feedText-- Returns:
- the text with the clickable url in it
-
-