Changeset 11418 for trunk


Ignore:
Timestamp:
2006-03-21T09:30:08+12:00 (18 years ago)
Author:
shaoqun
Message:

replaced & with &

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/CURL.java

    r11417 r11418  
    2727
    2828    try {
    29         url = new URL(url_str);
    30         input = url.openStream();
     29         url = new URL(url_str);
     30         input = url.openStream();
     31         //  int value = 0;
     32
     33         //            while ( (value=input.read())!=-1){
     34         //System.err.print((char)value);
     35         //}
     36             
     37         //url = new URL(url_str);
     38         //input = url.openStream();
     39
    3140    }
    3241    catch (MalformedURLException e) {
     42         
    3343        url_valid = false;
    3444    }
    3545    catch (IOException e) {
     46     
    3647        url_valid = false;
    3748    }
     
    7182    /** Checks that the content of the url is in html */
    7283    public boolean isHTML() {
    73     String content_type = guessContentType(url.toString());
    74 
     84
     85         String content_type = guessContentType(url.toString());
     86   
    7587    if(content_type.startsWith("text/html")) {
    7688        return true;
     
    144156    int value = getRaw();
    145157    if(value != -1) {
     158           
    146159        if(value == '<') {
    147160        //System.err.println("Parsing a tag starting " + (char)value);
     
    151164        value = getRaw();
    152165        while(value != -1 && peekRaw() != '<' && value != '>') {
    153             //System.err.println("Read a " + (char)value);
     166            //System.err.print((char)value);
    154167            tag = tag + (char) value;
    155168            value = getRaw();
    156169        }
     170   
    157171        //System.err.println("Read a " + (char)value);
    158172        //tag = smartLower(tag);
    159         tag = findURL(tag);
     173        //System.err.println("tag "+tag);
     174                tag = findURL(tag);
    160175        buffer = buffer + tag;
    161176        // Add closing > to buffer
     
    601616        }
    602617    }
    603 
     618       
     619        url_str =   url_str.replaceAll("&amp;","&");
     620   
    604621    if(state == HREF_FINAL ) {
    605622        try {
Note: See TracChangeset for help on using the changeset viewer.