5 ms·
This is a trick with Unicode RTL. The search query in the URL contains the character U+202E RIGHT-TO-LEFT OVERRIDE, followed by the searched-for text in normal
by waqf 15y ago
This is a trick with Unicode RTL. The search query in the URL contains the character U+202E RIGHT-TO-LEFT OVERRIDE, followed by the searched-for text in normal (nonreversed) order.
Apparently Google ignores this character when searching for matches (so the matches are displayed normally), but the character appears when the query is reproduced in the search box at top of the screen, so the search string appears backwards.
- blago 15y agoBingo. I wish I had a price for you.
- veyron 15y agos/price/prize/
- sjs 15y agoInteresting character. You can copy & paste it in front of any text in an editable field and the text immediately flips.
- lukejduncan 15y agoNot only that, but the entire directionality of the text box does to. E.g. arrowing right and left is flipped as well.
- blago 15y agoUnicode Bidirectional Algorithm: http://www.unicode.org/reports/tr9/ http://www.unicode.org/reports/tr9/
- praptak 15y agoThis character is interesting, one more thing to watch out for in user-provided input. You do your homework and escape HTML in users' comments but if you don't escape the RTL overrides, their effects can "bleed" to other parts of the page, rendering it unreadable or at least hard to read.
- Figs 15y agoThe bleeding over seems to apply to Google's title. In my browser, it shows up as "xoferiF allizoM - hcraeS elgooG"...
- gus_massa 15y agoBing has the same "feature": http://www.bing.com/search?q=%E2%80%AEthe%20answer%20to%20life%20the%20universe%20and%20everything http://www.bing.com/search?q=%E2%80%AEthe%20answer%20to%20li...