Attachment #94597: Patch for bug #18643

View | Details | Raw Unified | Return to bug 18643
Collapse All | Expand All

(-)content/html/content/src/nsFormSubmission.cpp (+12 lines)
Line     Link Here 
 Lines 1457-1462    Link Here 
1457
nsFormSubmission::ProcessValue(nsIDOMHTMLElement* aSource,
1457
nsFormSubmission::ProcessValue(nsIDOMHTMLElement* aSource,
1458
                               const nsAString& aName, const nsAString& aValue)
1458
                               const nsAString& aName, const nsAString& aValue)
1459
{
1459
{
1460
  // Hijack _charset_ (hidden inputs only) for internationalization (bug 18643)
1461
  if (aName == NS_LITERAL_STRING("_charset_")) {
1462
    nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(aSource);
1463
    if (formControl) {
1464
      PRInt32 type;
1465
      formControl->GetType(&type);
1466
      if (type == NS_FORM_INPUT_HIDDEN) {
1467
        return new nsString(mCharset);
1468
      }
1469
    }
1470
  }
1471
1460
  nsString* retval = nsnull;
1472
  nsString* retval = nsnull;
1461
  if (mFormProcessor) {
1473
  if (mFormProcessor) {
1462
    // XXX We need to change the ProcessValue interface to take nsAString
1474
    // XXX We need to change the ProcessValue interface to take nsAString

Return to bug 18643