Class AutoLinkCreator

java.lang.Object
ch.tocco.nice2.optional.forum.impl.util.AutoLinkCreator

public abstract class AutoLinkCreator extends Object
This helper class creates <a> tags for detected links in any html string.
  • Method Details

    • createLinks

      public static String createLinks(String html)
      This method receives any html string, detects URLs and surrounds them with <a> tags. Finds only URLs, which start with "http://", "https://" or "www.".
      Parameters:
      html - any html string
      Returns:
      the same html string, but all URLs are surrounded with <a> tags