Live data from Hacker News

Try and view the source

kurlak.com

51–60 of 86 posts

Re: Try and view the source

#51
post #3

A clever use of history.replaceState and some special characters (to make it less obvious that the state's been altered) - "view source" in Chrome operates on the currently active URL, which after the replaceState has executed is the "not that easily" page. You can also reproduce the behavior by navigating back, then forwards again - you'll see the "not that easily" page that way, as well (as the "try and view the so…

Just to add to this, the "special characters" are "%E2%80%AE" which is the escaped form of the UTF-8 "Right-To-Left Override" control character (which effectively reverses the display of text). If you try copying the URL to plain-text, you'll see: http://www.kurlak.com/john/%E2%80%AElmth.ecruos

Why is this possible? Is there a way to surpress this weirdness? I want to be able to trust my address bar again.

Re: Try and view the source

#54
Source history.replaceState(null, null, String.fromCharCode(8238) + 'lmth.ecruos');

Can you view my source from Chrome or Firefox?

This is on Firefox version 11.0. The creator of this page forgot the Firefox ecosystem has this nifty plug-in called NoScript.

Re: Try and view the source

#55
found in 5 seconds, with firefox: ctrl+A, right click with mouse, View Selection Source

Source history.replaceState(null, null, String.fromCharCode(8238) + 'lmth.ecruos');

Can you view my source from Chrome or Firefox?

Re: Try and view the source

#56

Earlier quoted context omitted.

Just to add to this, the "special characters" are "%E2%80%AE" which is the escaped form of the UTF-8 "Right-To-Left Override" control character (which effectively reverses the display of text). If you try copying the URL to plain-text, you'll see: http://www.kurlak.com/john/%E2%80%AElmth.ecruos

Why is this possible? Is there a way to surpress this weirdness? I want to be able to trust my address bar again.

I believe that RTL character is one of the main failures of UNICODE. This should be part of the markup / rich text, not part of the plain text.

Re: Try and view the source

#60

found in 5 seconds, with firefox: ctrl+A, right click with mouse, View Selection Source Source history.replaceState(null, null, String.fromCharCode(8238) + 'lmth.ecruos'); Can you view my source from Chrome or Firefox?

And in Chrome, Right Click, Inspect Element.
Post reply on HN