| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index e2225bac044e306c1e8450572c8abddec57518b6..43e13e01699588b5ad58399708010ebdf85ff69f 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -1144,6 +1144,19 @@ void ViewSource(Browser* browser, WebContents* contents) {
|
| if (!entry)
|
| return;
|
|
|
| + // If blink sent us to its blocked-page URL, show the source of the previous
|
| + // page (which generated the block) instead.
|
| + if (entry->GetURL() == GURL("data:,Blocked")) {
|
| + NavigationEntry* previous = contents->GetController().GetEntryAtOffset(-1);
|
| + if (previous) {
|
| + base::string16 value;
|
| + if (previous->GetExtraData("XSSDetected", &value) &&
|
| + value == base::ASCIIToUTF16("1")) {
|
| + entry = previous;
|
| + }
|
| + }
|
| + }
|
| +
|
| ViewSource(browser, contents, entry->GetURL(), entry->GetPageState());
|
| }
|
|
|
|
|