When using entity_embed with contact_storage, there is a possibility to embed forms into wysiwyg fields.
Unfortunately pathologic tries to rewrite the form action which leads to a broken form, because in drupal 8 form actions are placeholders (lazy_builder) at the time the Filter plugin is applied, this leads to double slashes after placeholder handling. For example:

* Placeholder 'form_action_hash' is set for form action in FormBuilder->prepareForm()
* FilterPathologic add local domain to action 'http://localhost/form_action_hash'
* FormBuilder->renderPlaceholderFormAction() sets form action 'http://localhost//node/id'

Post to double slash url leads to redirect which looses form data.
I removed action from the regex for now, maybe there is a better way or even make the regex configurable.

P.S.: Regex replacing for form actions was added afaik because of https://www.drupal.org/node/1095496, see also https://www.drupal.org/node/578478 for even more attributes which 'should' be replaced.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

volkerk created an issue. See original summary.

volkerk’s picture

Status: Active » Needs review
FileSize
598 bytes

Status: Needs review » Needs work

The last submitted patch, 2: pathologic-2781783-ignore-form-action.patch, failed testing.

volkerk’s picture

Status: Needs work » Needs review
FileSize
1.41 KB

Removed form aciton from test.

osopolar’s picture

Reroll patch from #4.