Bug 1761104 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

While reviewing patch in Bug 1758369, I found out we run normalization code before saving cc/address information to storage (ex, [add a record](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/FormAutofillStorageBase.jsm#354-389)) and when loading data from storage (ex, [loading a credit card](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/default/FormAutofillStorage.jsm#262)).

This leads one problem. Information is not normalized before saving. That is why we have Bug 1758369. The solution of this issue is doing normalization after submission. That means our normalization code spreads in different places and make the code hard to maintain.

Another question is that if we already do the normalization before saving cc/address, do we still need to do it while loading the data from the storage? Is it possible we only do the normalization after form submission?
While reviewing patch in Bug 1758369, I found out we run normalization code before saving cc/address information to storage (ex, [add a record](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/FormAutofillStorageBase.jsm#354-389)) and when loading data from storage (ex, [loading a credit card](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/default/FormAutofillStorage.jsm#262)).

This leads to one problem. Information is not normalized before saving. That is why we have Bug 1758369. The solution of this issue is doing normalization after submission. That means our normalization code spreads in different places and make the code hard to maintain.

Another question is that if we already do the normalization before saving cc/address, do we still need to do it while loading the data from the storage? Is it possible we only do the normalization after form submission?
While reviewing patch in Bug 1758369, I found out we run normalization code before saving cc/address information to storage (ex, [add a record](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/FormAutofillStorageBase.jsm#354-389)) and when loading data from storage (ex, [loading a credit card](https://searchfox.org/mozilla-central/rev/630b197be00e3df3f2e3fe995bf31ca50d146eaa/toolkit/components/formautofill/default/FormAutofillStorage.jsm#262)).

This leads to one problem. Information is not normalized before saving. That is why we have Bug 1758369. The solution of this issue is doing normalization after form submission. But that means our normalization code spreads in different places and make the code hard to maintain.

Another question is that if we already do the normalization before saving cc/address, do we still need to do it while loading the data from the storage? Is it possible we only do the normalization after form submission?

Back to Bug 1761104 Comment 0