TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you view copied browser content?

1 pointsby ademupover 3 years ago
I learned today that when you Copy All inside of a browser and then Paste into your text editor: It DOES NOT SHOW you the full contents of what is saved. I see stripped content. This greatly concerns me because I thought I could copy into a text editor, review for malicious javascript and various html etc, and if all clear, then paste the same contents into eg: another page (maybe the contents of a new comment box, or run a script on my server, etc). But all of the tags etc disappear when pasting into my text editor, leaving me with a completely false sense of security.<p>So I ask you, oh wise ones: How do YOU verify the contents of copied HTML from a browser?<p>How to reproduce my problem: 1) ctrl+a and ctrl+c this web site 2) open gedit, notepad, or create a new file in PHPStorm or even dev console 3) ctrl+v : you see plain text 4) go to summernote.org and ctrl+v into the big test box (even try this in a different browser!) 5) you see html the result of html,css, etc

2 comments

ademupover 3 years ago
To clarify: I&#x27;m in Ubuntu and the problem seems to be more strongly pronounced when copying from Chrome. eg: There&#x27;s a website that uses Modals to display profiles. When pasting from that profile copied from Chrome, summernote will display a modal that covers the whole screen. But when pasting the profile copied from within Firefox, the contents of the summernote box stay contained.
ademupover 3 years ago
I observe the same behavior in react-simple-wysiwyg. It is possible to paste html content that &quot;escapes&quot; the editor. Meanwhile, there appears to be NO WAY to view the content in a text editor or even code editor like PHPstorm.