Menu

problem parse url with anchor

Help
amythos
2006-10-25
2012-09-04
  • amythos

    amythos - 2006-10-25

    Problem in CommonUtil.encodeUrl(url, charset)
    when the url with anchor like this:http://www.example.org/test.php?param1=value1?param2=value2#anchor

    the ancor will be encoded with in param2,
    and value2 will be "value2%23anchor" here "#" encode into "%23"
    so param2 will get wrong value.

    and now i just remove the #anchor before encodeUrlParam for the moment,
    here is the code:
    eqIndex = paramValue.indexOf("#");
    if (eqIndex >= 0) {
    paramValue = paramValue.substring(0, eqIndex);
    }
    maybe not very well:p

    thanks for your project and regrets for my poor english:)

     
    • amythos

      amythos - 2006-10-29

      Thanks vnikic:)

       
    • Vladimir Nikic

      Vladimir Nikic - 2006-10-26

      I'm preparing new version of Web-Harvest where most of current bugs will be fixed.
      I'll check also this bug.
      I hope that in the following few days web-harvest 0.3 will be available on the site.

       
    • Vladimir Nikic

      Vladimir Nikic - 2006-10-27

      Fixed now in Web-Harvest 0.3

       

Log in to post a comment.