Opened 8 years ago

Closed 8 years ago

#14801 closed Bug (duplicate)

ACF filtering doesn't get applied upon Form Submit while Source mode is active

Reported by: gj_sm Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


Steps to reproduce

  1. Using this demo as an example:
  2. Switch to Source mode
  3. Enter content containing a non-supported tag, such as <style>test</style>
  4. Switch back to WYSIWYG mode
  5. Switch back to Source mode
  6. Observe: the <style> tags have been stripped out, as expected.
  7. Enter the content again: <style>test</style>
  8. While still in Source mode, click the 'Submit' button to submit the form.
  9. Observe in the "Data Posted to the Server" page: the <style> tags have not been stripped out

Alternatively, try using content <form>test</form>, observe that it is transformed to <p>test</p> as expected, but if submitted in Source mode, no transformation takes place.

Expected result

The unsupported tags should be stripped out prior to submitting the data.

Actual result

The unsupported tags are NOT stripped out prior to submitting the data. Apparently this only happens when switching editor mode and on other events not related to the form submission.

Other details (browser, OS, CKEditor version, installed plugins)


Change History (2)

comment:1 Changed 8 years ago by gj_sm

My current workaround for this issue is to force all CKEditor instances from mode=source to mode=wysiwyg upon form submit. This works, but is very ugly and severely complicates relevant routines.

Ideally there would be a way to get editor.getData() to actually apply the ACF rules while in Source mode.

Last edited 8 years ago by gj_sm (previous) (diff)

comment:2 Changed 8 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed
Version: 4.5.10 (GitHub - master)

DUP of #10902

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy