I\'m building a JS bookmarklet which allows me to capture text that a user has selected in their browser and sends it off to a web app. I\'ve currently checked out a couple of t
Append the results of getSelection().getRangeAt(0).cloneContents() to a div and then get the innerHTML of the div.
javascript:(function()%7Bvar%20node%3Ddocument.createElement('div')%3Bnode.appendChild(getSelection().getRangeAt(0).cloneContents())%3Balert(node.innerHTML)%3B%7D)()%3B
If you pass the markup in a GET request, you'll need to use encodeURIComponent() on it first.
Also note that a GET request might only accept so much data.