New issue
Advanced search Search tips

Issue 921278 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

saveAsMHTML doesn't save iframe on etherpad.net

Reported by safinas...@gmail.com, Jan 12

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36

Steps to reproduce the problem:
* Open in Chromium https://etherpad.net
* Type some pad name. Make sure it is random, i. e. it doesn't clash with names other people typed
* Type some text into pad
* Try to save this tab using chrome.pageCapture.saveAsMHTML from an extension
* Then somehow save this MHTML to a file on your computer and open this MHTML in browser

What is the expected behavior?
Text typed into pad should persist

What went wrong?
Text in pad is absent

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 71.0.3578.80  Channel: n/a
OS Version: Debian stretch
Flash Version: 

Text in pad is implemented using iframe. When I load saved MHTML, this iframe becomes empty, i. e. it becomes just <html><head></head><body></body></html>. But iframe saving works correctly in other situations. For example, create locally the following file:

<html><body><iframe src="https://en.wikipedia.org"></iframe></body></html>

Then navigate to this local file (i. e. your omnibox should show "file:///..."). Then save it using chrome.pageCapture.saveAsMHTML . Then save this MHTML file and navigate to it. You will see that iframe was successfully saved, and that its full content is actually embedded into MHTML file. If you click "view page source", you will see in source something like this:

<iframe src="cid:frame-418C5D6261D522AC7800832F161975AC@mhtml.blink">

So, in this situation iframe saving works. So, why iframe saving doesn't work with etherpad.net ?

Now let me describe why I need all this.

I'm not satisfied with Chromium feature "Restore pages". For example, I found bug https://crbug.com/921185 in it. Moreover, DOM is not saved. It seems you just save URL and form data, but not whole DOM. So, I'm writing my extension (for personal use only), which will perform alternative page saving and restoring. I decided to use chrome.pageCapture.saveAsMHTML to save page. Then I will probably use native messaging ( https://developer.chrome.com/extensions/nativeMessaging ) to actually store this MHTML to computer's file system. And then I will load it back to browser when needed. And now I got that etherpad.net issue
 
Labels: Needs-Triage-M71
TE@, this is a "Blink>SavePage" component and you can confirm it even without a demo extension:

1. enable chrome://flags/#save-page-as-mhtml and restart the browser
2. open https://etherpad.net/p/123
   (or create a new one as described by the reporter)
3. focus the address bar and press Ctrl-S to save the page
   (or invoke it from the browser menu -> more tools)
4. make sure "Webpage, Single file" type is active below the file name input box
5. click the save button
6. open the saved file in the browser

Expected: "fooo" inside the editor box and line numbers are shown
Observed: the editor box is empty
good.png
9.6 KB View Download
bad.png
8.8 KB View Download

Comment 3 by vamshi.kommuri@chromium.org, Jan 18 (4 days ago)

Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Target-73 M-73 FoundIn-71 FoundIn-73 FoundIn-72 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 71.0.3578.80 and on the latest canary 73.0.3674.0 using Ubuntu 14.04, Mac 10.14.1 and Windows 10

As the issue is seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.

Sign in to add a comment