htmlark icon indicating copy to clipboard operation
htmlark copied to clipboard

<img src=''> puts entire HTML document into empty src

Open naterm60 opened this issue 6 years ago • 0 comments

Just like the title says. I found that my empty src attribute received a very long base64 string, so I decoded it, and it contains my index.html.

So I tried the recommended approach for empty src's, src='//:0' and got "No such file or directory: '//:0'". (See https://stackoverflow.com/questions/19126185/setting-an-image-src-to-empty/19126281).

Note that src='#' isn't recommended.

So I tried a 1 pixel image, which worked: src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"

naterm60 avatar Jan 20 '20 20:01 naterm60