Google Search Bug – How to Identify and Report

google-search

When I insert this URL in the browser's address field:

https://www.google.com/search?q=notepad++.exe

then the plus characters are replaced by space characters in the Google search field:

enter image description here

How can this bug be avoided?

Best Answer

This isn't a bug - when encoding URLs, the character set becomes more limited, meaning that there needs to be a way to represent the full character set that is now unavailable.

  • A plus (+) is used to mark a space - you will also see a space encoded as %20.
  • A question mark (?) is often used to separate the resource path and the query string.
  • A percent sign (%) is used to initiate the escape sequence.

If you want to make use of a literal + then you must escape it, using the standard %xx sequence, and providing the hex value for the character.

In this case, you want to represent a +, the ASCII value for which is 43 decimal, or 0x2B hexadecimal.

This means that you need to use %2B in place of the +.

Similarly if you want to represent a literal %, then you must "escape" it, because it is used to initiate the escape sequence... you must use %25 in place of a %.


Research "URL Encoding" to find out more

Try entering notepad++.exe into the box on this page: HTML URL Encoding Reference.