mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
bug 47532, incorrect display in signon viewer, r=pnunn
This commit is contained in:
parent
923cfd50c2
commit
47cdae449d
@ -229,8 +229,7 @@ function LoadNopreview()
|
||||
var currSignon = TrimString(nopreviewList[i]);
|
||||
// TEMP HACK until morse fixes signon viewer functions
|
||||
currSignon = RemoveHTMLFormatting(currSignon);
|
||||
var form = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("nopreviewlist",[form],"nopreview_",i-1);
|
||||
AddItem("nopreviewlist",[currSignon],"nopreview_",i-1);
|
||||
}
|
||||
if (deleted_nopreviews_count >= nopreviewList.length) {
|
||||
document.getElementById("removeAllNopreviews").setAttribute("disabled","true");
|
||||
@ -274,8 +273,7 @@ function LoadNocapture()
|
||||
var currSignon = TrimString(nocaptureList[i]);
|
||||
// TEMP HACK until morse fixes signon viewer functions
|
||||
currSignon = RemoveHTMLFormatting(currSignon);
|
||||
var form = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("nocapturelist",[form],"nocapture_",i-1);
|
||||
AddItem("nocapturelist",[currSignon],"nocapture_",i-1);
|
||||
}
|
||||
if (deleted_nocaptures_count >= nocaptureList.length) {
|
||||
document.getElementById("removeAllNocaptures").setAttribute("disabled","true");
|
||||
|
@ -3428,6 +3428,8 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindow* window) {
|
||||
|
||||
/* get url name as ascii string */
|
||||
char *URLName = nsnull;
|
||||
char *strippedURLName = nsnull;
|
||||
nsAutoString strippedURLNameAutoString;
|
||||
nsCOMPtr<nsIURI> docURL;
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
currentForm->GetDocument(*getter_AddRefs(doc));
|
||||
@ -3439,11 +3441,14 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindow* window) {
|
||||
return;
|
||||
}
|
||||
(void)docURL->GetSpec(&URLName);
|
||||
wallet_GetHostFile(docURL, strippedURLNameAutoString);
|
||||
strippedURLName = strippedURLNameAutoString.ToNewCString();
|
||||
|
||||
/* get to the form elements */
|
||||
nsCOMPtr<nsIDOMHTMLDocument> htmldoc(do_QueryInterface(doc));
|
||||
if (htmldoc == nsnull) {
|
||||
nsCRT::free(URLName);
|
||||
nsCRT::free(strippedURLName);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3451,6 +3456,7 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindow* window) {
|
||||
nsresult rv = htmldoc->GetForms(getter_AddRefs(forms));
|
||||
if (NS_FAILED(rv) || (forms == nsnull)) {
|
||||
nsCRT::free(URLName);
|
||||
nsCRT::free(strippedURLName);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3593,7 +3599,7 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindow* window) {
|
||||
#else
|
||||
/* save form if it meets all necessary conditions */
|
||||
if (wallet_GetFormsCapturingPref() &&
|
||||
(OKToPrompt) && wallet_OKToCapture(URLName, window)) {
|
||||
(OKToPrompt) && wallet_OKToCapture(strippedURLName, window)) {
|
||||
|
||||
/* give caveat if this is the first time data is being captured */
|
||||
Wallet_GiveCaveat(window, nsnull);
|
||||
@ -3643,6 +3649,7 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindow* window) {
|
||||
}
|
||||
}
|
||||
nsCRT::free(URLName);
|
||||
nsCRT::free(strippedURLName);
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
|
Loading…
x
Reference in New Issue
Block a user