Package rabbit.html

Examples of rabbit.html.Tag


  List<Token> tokens = block.getTokens ();
  int tsize = tokens.size ();
  for (int i = 0; i < tsize; i++) {
      Token t = tokens.get (i);
      if (t.getType () == TokenType.TAG) {
    Tag tag = t.getTag ();
    TagType tagtype = tag.getTagType ();
    if (tagtype == TagType.A) {
        astart = i;
        Tag atag = tag;
        int ttsize = tokens.size ();
        for (; i < ttsize; i++) {
      Token tk2 = tokens.get (i);
      if (tk2.getType () == TokenType.TAG) {
          Tag tag2 = tk2.getTag ();
          TagType t2tt = tag2.getTagType ();
          if (t2tt != null &&
        t2tt == TagType.SA)
        break;
          else if (t2tt != null &&
             t2tt == TagType.IMG) {
        if (isEvil (atag.getAttribute ("href")))
            tag2.setAttribute ("src", adreplacer);
          }
      }
        }
        if (i == tsize && astart < i) {
      block.setRest ((tokens.get (astart)).getStartIndex ());
View Full Code Here


           PREFIX)),
         pos++);
  if (config.getProperty (getClass ().getName (),
        "unfilteredlink",
        "true").toLowerCase ().equals ("true")) {
      Tag a = new Tag ("A");
      try {
    URL url = new URL (request.getRequestURI ());
    a.addArg ("HREF", getHref (url));
    block.insertToken (new Token (a), pos++);
    block.insertToken (new Token
           (config.getProperty (getClass ().getName (),
              "link",
              LINK)),
           pos++);
    Tag slasha = new Tag ("/A");
    block.insertToken (new Token (slasha), pos++);
      } catch (MalformedURLException e) {
    // ignore
      }
  }
View Full Code Here

  int tsize = tokens.size ();
  for (int i = 0; i < tsize; i++) {
      Token t = tokens.get (i);
      switch (t.getType ()) {
      case TAG:
    Tag tag = t.getTag ();
    handleTag (tag, block, i);
      }
  }
    }
View Full Code Here

TOP

Related Classes of rabbit.html.Tag

Copyright © 2018 www.massapicom. 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.