Merge branch 'MDL-78485-401' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE

This commit is contained in:
Ilya Tregubov
2023-07-05 11:52:11 +08:00
4 changed files with 15 additions and 2 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
View File
@@ -241,6 +241,8 @@ const getStandardConfig = (target, tinyMCE, options, plugins) => {
// eslint-disable-next-line camelcase
a11y_advanced_options: true,
extended_valid_elements: 'script[*]',
// Disable quickbars entirely.
// The UI is not ideal and we'll wait for it to improve in future before we enable it in Moodle.
// eslint-disable-next-line camelcase
@@ -0,0 +1,11 @@
@core @editor_tiny @source_code @javascript
Feature: A user can insert script tag in TinyMCE
Scenario: Allow script elements in the editor
Given I log in as "admin"
And I open my profile in edit mode
When I click on the "Tools > Source code" menu item for the "Description" TinyMCE editor
Then I set the field with xpath "//textarea[@class='tox-textarea']" to "<p><script>alert('script in tiny');</script></p>"
And I click on "Save" "button"
When I click on the "Tools > Source code" menu item for the "Description" TinyMCE editor
Then the field with xpath "//textarea[@class='tox-textarea']" matches value "<p><script>alert('script in tiny');</script></p>"