Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • 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
      • escapeHtml

        protected static String escapeHtml​(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