OSD lab6 blog post
During this lab, I found that the Brave browser will fail to search or open the correct content for the two url:
"https://www.google.ca/search?q=dog cat"
"file:///Users/humphd/repos/browser-laptop/dog cat.txt"
they all have a space between dog and cat, and because of that, the browser will consider they are not a valid url. I tried to fix this bug.
I found when they check the url, they only trim the spaces at beginning and end. The space between dog and cat won't be replace or encoded as an url. So, I added the code.
And I wrote test cases:
As well as ran the unit test:
Comments
Post a Comment