odoo/odoo#171301

Created by fw-bot
Merged at 49253907753b829d30b932d8c3ac0fca2ac7bd65

Statuses:

label
odoo-dev:saas-17.1-16.0-zwnbsp-traceback-on-save-deso-dDM0-fw
head
5863d006c0361194dce58db55a8fa56efbf510ca
merged
2 years ago by Quentin Smetz (qsm)
odoo/odoo
16.0 #167365
17.0 #171068
saas-17.1 #171301
saas-17.2 #171313
saas-17.3 #171320
18.0
saas-18.2
saas-18.3
saas-18.4
19.0
saas-19.1
saas-19.2
saas-19.3
master #171544

[FW][FIX] web_editor: lingering zwnbsp tracebacks on save

Steps to reproduce:

  1. Go to website > Edit
  2. Drag and drop 'Banner' snippet and 'Items' snippet > Save
  3. Repeat the step 2 again
  4. Error will be generated in terminal

Current behavior before PR:

Dropping and saving new snippets immediately after snippets containing links would generate a traceback. This issue occurred because the callPostSnippetDrop had not completed execution, and cleanForSave, responsible for removing zwnbsp was called prematurely. Consequently historyStep after callPostSnippetDrop would reintroduce zwnbsp to links.

Desired behavior after PR is merged:

Ensure that all post-snippet drop promises are resolved before saving.

task-3954229

Forward-Port-Of: #171068
Forward-Port-Of: #167365