Avoid use getRangeAt() to get selection content

getRangeAt() returns a Range and when you use toString() it returns all the
content of the Range including elements not being renderer (like a display:none
block or a source element for a region).

In order to get the user selection and void elements not renderer we should use
directly window.getSelection().toString().