bundle->GetStringFromName(NS_LITERAL_STRING("DefaultFormSubject").get(), getter_Copies(subjectStr));
nsContentUtils::GetLocalizedString(nsContentUtils::eFORMS_PROPERTIES, "DefaultFormSubject", subjectStr);
HandleMailtoSubject(nsCString& aPath) {  // Walk through the string and see if we have a subject already.  PRBool hasSubject = PR_FALSE;  PRBool hasParams = PR_FALSE;  PRInt32 paramSep = aPath.FindChar('?');  while (paramSep != kNotFound && paramSep < (PRInt32)aPath.Length()) {    hasParams = PR_TRUE;    // Get the end of the name at the = op.  If it is *after* the next &,    // assume that someone made a parameter without an = in it    PRInt32 nameEnd = aPath.FindChar('=', paramSep+1);    PRInt32 nextParamSep = aPath.FindChar('&', paramSep+1);    if (nextParamSep == kNotFound) {      nextParamSep = aPath.Length();    }    // If the = op is after the &, this parameter is a name without value.    // If there is no = op, same thing.    if (nameEnd == kNotFound || nextParamSep < nameEnd) {      nameEnd = nextParamSep;    }    if (nameEnd != kNotFound) {      if (Substring(aPath, paramSep+1, nameEnd-(paramSep+1)) ==          NS_LITERAL_CSTRING("subject")) {        hasSubject = PR_TRUE;        break;      }    }    paramSep = nextParamSep;  }  // If there is no subject, append a preformed subject to the mailto line  if (!hasSubject) {    if (hasParams) {      aPath.Append('&');    } else {      aPath.Append('?');    }    // Get the default subject    nsresult rv;    nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);    if (NS_FAILED(rv))      return;    nsCOMPtr<nsIStringBundle> bundle;    rv = bundleService->CreateBundle("chrome://communicator/locale/layout/HtmlForm.properties",                                     getter_AddRefs(bundle));    if (NS_FAILED(rv))      return;    nsXPIDLString subjectStr;    bundle->GetStringFromName(NS_LITERAL_STRING("DefaultFormSubject").get(), getter_Copies(subjectStr));    aPath.AppendLiteral("subject=");    nsCString subjectStrEscaped;    aPath.Append(NS_EscapeURL(NS_ConvertUTF16toUTF8(subjectStr), esc_Query, subjectStrEscaped));  }}