magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.48k stars 9.29k forks source link

CMS HTML validator missing H6 tag #36339

Open adamlavery opened 1 year ago

adamlavery commented 1 year ago

Preconditions and environment

OS 2.4.3-p1

Steps to reproduce

  1. Add CMS block (Content - Blocks - Add new Block)
  2. Edit with page builder - Drag Row
  3. Elements - Drag Heading
  4. Add H6 tag and save

Expected result

Block should be saved without warnings.

Actual result

Results in "Temporarily allowed to save HTML value that contains restricted elements".

Additional information

H6 tag has been omitted from valid tags, only H1-5 are included.

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @adamlavery. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

adamlavery commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @adamlavery. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @adamlavery, here is your Magento Instance: https://0e3af2ce7a291b7db8881e668e9b4613.instances.magento-community.engineering Admin access: https://0e3af2ce7a291b7db8881e668e9b4613.instances.magento-community.engineering/admin_f142 Login: 1de392c2 Password: ef89d699d9ac

adamlavery commented 1 year ago

Confirmed present in 2.4-develop

adamlavery commented 1 year ago

vendor\magento\module-cms\etc\di.xml:

    <virtualType name="DefaultWYSIWYGValidator" type="Magento\Framework\Validator\HTML\ConfigurableWYSIWYGValidator">
        <arguments>
            <argument name="allowedTags" xsi:type="array">
                <item name="div" xsi:type="string">div</item>
                <item name="a" xsi:type="string">a</item>
                <item name="p" xsi:type="string">p</item>
                <item name="span" xsi:type="string">span</item>
                <item name="em" xsi:type="string">em</item>
                <item name="strong" xsi:type="string">strong</item>
                <item name="ul" xsi:type="string">ul</item>
                <item name="li" xsi:type="string">li</item>
                <item name="ol" xsi:type="string">ol</item>
                <item name="h5" xsi:type="string">h5</item>
                <item name="h4" xsi:type="string">h4</item>
                <item name="h3" xsi:type="string">h3</item>
                <item name="h2" xsi:type="string">h2</item>
                <item name="h1" xsi:type="string">h1</item>
                <item name="table" xsi:type="string">table</item>
                <item name="tbody" xsi:type="string">tbody</item>
                <item name="tr" xsi:type="string">tr</item>
                <item name="td" xsi:type="string">td</item>
                <item name="th" xsi:type="string">th</item>
                <item name="tfoot" xsi:type="string">tfoot</item>
                <item name="img" xsi:type="string">img</item>
                <item name="hr" xsi:type="string">hr</item>
                <item name="figure" xsi:type="string">figure</item>
                <item name="button" xsi:type="string">button</item>
                <item name="i" xsi:type="string">i</item>
                <item name="u" xsi:type="string">u</item>
                <item name="br" xsi:type="string">br</item>
                <item name="b" xsi:type="string">b</item>
            </argument>
m2-assistant[bot] commented 1 year ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 1 year ago

@magento give me 2.4-develop instance with edition ee

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://0e3af2ce7a291b7db8881e668e9b4613.instances.magento-community.engineering Admin access: https://0e3af2ce7a291b7db8881e668e9b4613.instances.magento-community.engineering/admin_0841 Login: 7730ce48 Password: 28adfecc85c9

engcom-November commented 1 year ago

We are confirming this issue as its reproducible on 2.4-develop instance. User is able to save the block but below warning message is displayed which is conflicting with Magento documentation. H6 is a supported tag mentioned in magento docs but still warning message displayed where H6 tag is not mentioned in supported tags listing. image

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6873 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.