Package info.bliki.htmlcleaner

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


    aTagNode.addAttribute("class", "externallink", true);
    aTagNode.addAttribute("title", link, true);
    aTagNode.addAttribute("rel", "nofollow", 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


    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

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

      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();
      return;
    }
  }
View Full Code Here

  private boolean createBBCode(String bbStr, String bbAttr, String innerTag) {
    if (bbStr.equals("code")) {
      TagNode preTagNode = new TagNode("pre");
      preTagNode.addAttribute("class", "code", true);
      preTagNode.addChild(new ContentToken(innerTag));
      fWikiModel.append(preTagNode);
      return true;
    } else if (bbStr.equals("color")) {
      if (bbAttr == null) {
        return false;
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

      return true;
    } else if (bbStr.equals("email")) {
      TagNode aTagNode = new TagNode("a");
      aTagNode.addAttribute("href", "emailto:" + innerTag.trim(), true);
      aTagNode.addChild(new ContentToken(innerTag));
      fWikiModel.append(aTagNode);

      return true;
    } else if (bbStr.equals("list")) {
      int listStart = 0;
View Full Code Here

      }
      return true;
    } else if (bbStr.equals("img")) {
      TagNode imgTagNode = new TagNode("img");
      imgTagNode.addAttribute("src", innerTag.trim(), true);
      imgTagNode.addChild(new ContentToken(innerTag));
      fWikiModel.append(imgTagNode);

      return true;
    } else if (bbStr.equals("quote")) {
      TagNode quoteTagNode = new TagNode("blockquote");
View Full Code Here

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

      return true;
    } else if (bbStr.equals("url")) {
      if (bbAttr != null) {
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.