Menu

#1728 Processing base URLs with leading whitespace fails

Latest SVN
closed
None
1
2015-11-15
2015-11-13
No

There is a small regression in v2.19 when processing base URLs. In case the value in the "href" attribute of a base element starts with whitespace, the resulting base URL is wrong. See below what happens:

URL of main page:
"http://localhost/index.html"

Value of the href attribute of the page's base element:
" http://localhost/"

Expected base URL:
"http://localhost/"

Actual base URL:
"http://localhost/index.html http://localhost/"

Looks like the code doesn't recognize the specified base URL as absolute URL because of the leading whitespace and constructs a base URL from the page's URL.

Attached is a patch that adds another test to HtmlPage3Test and tries to fix this issue.

1 Attachments

Discussion

  • RBRi

    RBRi - 2015-11-15
    • status: open --> accepted
    • assigned_to: Ahmed Ashour
     
  • RBRi

    RBRi - 2015-11-15

    As always thanks for the patch.

     
  • RBRi

    RBRi - 2015-11-15
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB