sebb        2004/01/06 16:38:22

  Modified:    src/htmlparser/org/htmlparser/scanners ImageScanner.java
  Log:
  Make compliant with JDK1.3
  
  Revision  Changes    Path
  1.3       +3 -1      
jakarta-jmeter/src/htmlparser/org/htmlparser/scanners/ImageScanner.java
  
  Index: ImageScanner.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/htmlparser/org/htmlparser/scanners/ImageScanner.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ImageScanner.java 29 Nov 2003 21:36:29 -0000      1.2
  +++ ImageScanner.java 7 Jan 2004 00:38:22 -0000       1.3
  @@ -73,6 +73,7 @@
   //////////////////
   import java.util.Hashtable;
   
  +import org.apache.jorphan.util.JOrphanUtils;
   import org.htmlparser.tags.ImageTag;
   import org.htmlparser.tags.Tag;
   import org.htmlparser.tags.data.TagData;
  @@ -134,7 +135,8 @@
                                        // the bug, I strip out alt="" and then append
                                        // it at the end. When the alt attribute has a
                                        // value, the bug does not appear.
  -                                     String newtext = tagText.replaceAll("alt=\"\" 
","");
  +                                     //JDK1.4: String newtext = 
tagText.replaceAll("alt=\"\" ","");
  +                                     String newtext = 
JOrphanUtils.replaceFirst(tagText,"alt=\"\" ","");
                                        tag.setText(newtext + " alt=\"\"");
                                        table = tag.redoParseAttributes();
                                        relativeLink = (String)table.get("SRC");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to