Bug 329959: Dialog Origin Spoofing fix on Mac for SeaMonkey; p=<stefanh@bluebottle.com>, r=me, sr=Neil

This commit is contained in:
mnyromyr%tprac.de 2006-03-20 21:35:11 +00:00
parent cc8d86617c
commit 24468da038
2 changed files with 13 additions and 2 deletions

View File

@ -103,8 +103,17 @@ function setLabelForNode(aNode, aLabel, aIsLabelFlag)
function commonDialogOnLoad()
{
// set the document title
document.title = gCommonDialogParam.GetString(12);
// Set the document title. On Mac, we only care about URI's.
if (/Mac/.test(navigator.platform)) {
var titleString = gCommonDialogParam.GetString(12);
if (/^\w+:\/\/\w/.test(titleString)) {
setElementText("info.title", titleString, true);
unHideElementById("info.title"); // Show URI inside dialog.
}
}
else {
document.title = gCommonDialogParam.GetString(12);
}
// set the number of command buttons
var nButtons = gCommonDialogParam.GetInt(2);

View File

@ -21,6 +21,8 @@
</hbox>
<vbox flex="1" style="max-width: 45em;">
<!-- title -->
<description id="info.title" class="header" hidden="true"/>
<!-- text -->
<description id="info.header" class="header"/>
<vbox id="info.box"/>