Magento2: 2.3 - WYSIWYG Editor removes <i> tag

Created on 6 Mar 2019  路  19Comments  路  Source: magento/magento2

Preconditions (*)

  1. Magento ver 2.3.0
  2. PHP 7.2.15
  3. Ubuntu 18.04.1

Steps to reproduce (*)

  1. Content -> Pages -> Show or hide wysiwg editor -> Insert tag anywhere. Inside elements or on it's own.

Expected result (*)


wysiwyg_editor_error_1

Actual result (*)


wysiwyg_editor_error_2

Format is valid non-issue

Most helpful comment

Why is this issue closed, it is still happening

All 19 comments

Hi @Rueff19. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@Rueff19 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@magento-engcom-team give me 2.3-develop instance

Hi @Rueff19. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @Rueff19, here is your Magento instance.
Admin access: https://i-21602-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

Hi @Rueff19. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @Rueff19, here is your Magento instance.
Admin access: https://i-21602-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@magento-engcom-team give me 2.3-develop instance

Hi @abrarpathan19. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @abrarpathan19. 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:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • _Next steps are available in case you are a member of Community Maintainers._

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

Hi @abrarpathan19, here is your Magento instance.
Admin access: https://i-21602-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

Hi @engcom-backlog-nazar. 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:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • _Next steps are available in case you are a member of Community Maintainers._

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

Hi @Rueff19 Yes, TinyMCE treats all empty elements that don't have meaning in html as empty space, same as browsers treat them. <span></span>, <div></div>, even <p></p>are not displayed in the browser. If they have any attributes, they are not removed.

@Rueff19 work around
The second, more stable solution was to use a html comment tag, this doesn鈥檛 have the side effect of visually outputting any extra markup as per the previous option.

<i class="fa fa-gamepad"><!-- icon --></i>

@engcom-backlog-nazar Thank you, as ver 2.2 allows it I thought it was something more complicated.
Thanks for the quick reply and work arround.

@engcom-backlog-nazar
With the <!-- Icon -->, another thing is that it now changes the <i> tag to <em>.
In this case it doesn't affect the outcome but might be something worth looking into.

Is there any update or workarund to this?
We just encountered this issue with one of our merchants.

<!-- Icon --> updates the <i> element to <em> as mention in the comment above...

Why is this issue closed, it is still happening

Reopen please.

Was this page helpful?
0 / 5 - 0 ratings