Followup fix for jst's patch (292691).
git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_1_20050124_BRANCH@173260 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -6673,13 +6673,15 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType)
|
||||
NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(aEntry->GetContentType(contentType), NS_ERROR_FAILURE);
|
||||
|
||||
PRBool isJavaScript, isData;
|
||||
PRBool isJavaScript, isViewSource, isData;
|
||||
if ((NS_SUCCEEDED(uri->SchemeIs("javascript", &isJavaScript)) &&
|
||||
isJavaScript) ||
|
||||
(NS_SUCCEEDED(uri->SchemeIs("view-source", &isViewSource)) &&
|
||||
isViewSource) ||
|
||||
(NS_SUCCEEDED(uri->SchemeIs("data", &isData)) && isData)) {
|
||||
// We're loading a javascript: or data: URL from session
|
||||
// history. Replace the current document with about:blank to
|
||||
// prevent anything from the current document from leaking
|
||||
// We're loading a javascript:, view-source: or data: URL from
|
||||
// session history. Replace the current document with about:blank
|
||||
// to prevent anything from the current document from leaking
|
||||
// into any JavaScript code in the URL.
|
||||
rv = CreateAboutBlankContentViewer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user