Package info.bliki.htmlcleaner

Examples of info.bliki.htmlcleaner.TagNode.addChild()


      e.printStackTrace();
    } catch (Throwable e) {
      e.printStackTrace();
      TagNode divTagNode = new TagNode("div");
      divTagNode.addAttribute("class", "error", true);
      divTagNode.addChild(new ContentToken(command + ": " + e.getMessage()));
      fWikiModel.append(divTagNode);
      e.printStackTrace();
    }
  }
View Full Code Here


    aTagNode.addAttribute("rel", "nofollow", true);
    if (withoutSquareBrackets) {
      aTagNode.addAttribute("class", "externallink", true);
      aTagNode.addAttribute("title", link, true);
      append(aTagNode);
      aTagNode.addChild(new ContentToken(linkName));
    } else {
      String trimmedText = linkName.trim();
      if (trimmedText.length() > 0) {
        pushNode(aTagNode);
        if (linkName.equals(link)) {
View Full Code Here

        pushNode(aTagNode);
        if (linkName.equals(link)) {
          if (withoutSquareBrackets) {
            aTagNode.addAttribute("class", "externallink", true);
            aTagNode.addAttribute("title", link, true);
            aTagNode.addChild(new ContentToken(trimmedText));
          } else {
            aTagNode.addAttribute("class", "external autonumber", true);
            aTagNode.addChild(new ContentToken("[" + (++fExternalLinksCounter) + "]"));
          }
        } else {
View Full Code Here

            aTagNode.addAttribute("class", "externallink", true);
            aTagNode.addAttribute("title", link, true);
            aTagNode.addChild(new ContentToken(trimmedText));
          } else {
            aTagNode.addAttribute("class", "external autonumber", true);
            aTagNode.addChild(new ContentToken("[" + (++fExternalLinksCounter) + "]"));
          }
        } else {
          aTagNode.addAttribute("class", "externallink", true);
          aTagNode.addAttribute("title", link, true);
          WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

    append(aTagNode);
    aTagNode.addAttribute("href", isbnString, true);
    aTagNode.addAttribute("class", "external text", true);
    aTagNode.addAttribute("title", isbnString, true);
    aTagNode.addAttribute("rel", "nofollow", true);
    aTagNode.addChild(new ContentToken(isbnPureText));
  }

  /**
   * {@inheritDoc}
   */
 
View Full Code Here

    append(aTagNode);
    aTagNode.addAttribute("href", isbnString, true);
    aTagNode.addAttribute("class", "external text", true);
    aTagNode.addAttribute("title", isbnString, true);
    aTagNode.addAttribute("rel", "nofollow", true);
    aTagNode.addChild(new ContentToken(isbnPureText));
  }

  public void appendMailtoLink(String link, String linkName, boolean withoutSquareBrackets) {
    // is it an image?
    // link = Utils.escapeXml(link, true, false, false);
View Full Code Here

    append(aTagNode);
    aTagNode.addAttribute("href", link, true);
    aTagNode.addAttribute("class", "external free", true);
    aTagNode.addAttribute("title", link, true);
    aTagNode.addAttribute("rel", "nofollow", true);
    aTagNode.addChild(new ContentToken(linkName));
  }

  public void appendRawWikipediaLink(String rawLinkText, String suffix) {
    String rawTopicName = rawLinkText;
    if (rawTopicName != null) {
View Full Code Here

      aTagNode.addAttribute("href", link, true);
      aTagNode.addAttribute("class", "telephonelink", true);
      aTagNode.addAttribute("title", link, true);
      if (withoutSquareBrackets) {
        append(aTagNode);
        aTagNode.addChild(new ContentToken(linkName));
      } else {
        String trimmedText = linkName.trim();
        if (trimmedText.length() > 0) {
          pushNode(aTagNode);
          WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

      aTagNode.addAttribute("href", link, true);
      aTagNode.addAttribute("class", "telephonelink", true);
      aTagNode.addAttribute("title", link, true);
      if (withoutSquareBrackets) {
        append(aTagNode);
        aTagNode.addChild(new ContentToken(linkName));
      } else {
        String trimmedText = linkName.trim();
        if (trimmedText.length() > 0) {
          pushNode(aTagNode);
          WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

      if (bbAttr == null) {
        return false;
      }
      TagNode fontTagNode = new TagNode("font");
      fontTagNode.addAttribute("color", bbAttr, true);
      fontTagNode.addChild(new ContentToken(innerTag));
      fWikiModel.append(fontTagNode);

      return true;
    } else if (bbStr.equals("email")) {
      TagNode aTagNode = new TagNode("a");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.