Changeset 40 in code


Ignore:
Timestamp:
Nov 26, 2016, 10:16:11 AM (9 years ago)
Author:
alex
Message:

[fix] fix infinite loop with <base target=".." />

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/morty.go

    r39 r40  
    354354                                        for {
    355355                                                attrName, attrValue, moreAttr := decoder.TagAttr()
    356                                                 if !bytes.Equal(attrName, []byte("href")) {
    357                                                         continue
    358                                                 }
    359                                                 parsedURI, err := url.Parse(string(attrValue))
    360                                                 if err == nil {
    361                                                         rc.BaseURL = parsedURI
     356                                                if bytes.Equal(attrName, []byte("href")) {
     357                                                        parsedURI, err := url.Parse(string(attrValue))
     358                                                        if err == nil {
     359                                                                rc.BaseURL = parsedURI
     360                                                        }
    362361                                                }
    363362                                                if !moreAttr {
Note: See TracChangeset for help on using the changeset viewer.