TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you view copied browser content?

1 点作者 ademup超过 3 年前
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 条评论

ademup超过 3 年前
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.
ademup超过 3 年前
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.