Safari: Get source code of current page

Gets the source rather then the text.

--Get Page Source From Safari
on run {input, parameters}
tell application "Safari" to set my_html to source of document 1
return my_html
return input
end run