Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Emogrifier: Support HTML5 void tags #653

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

JakeQZ
Copy link
Contributor

@JakeQZ JakeQZ commented Mar 14, 2019

Added support to Emogrifier for HTML5 self-closing tags not recognized as such
by PHP’s DOMDocument implementation.

This is a port of the equivalent changes made for AbstractHtmlProcessor
in #651, with some differences in the tests:

  • The tests employ emogrify and emogrifyBodyContent rather than render and
    renderBodyContent, as the latter are not public methods;
  • Since, by default, emogrify removes <wbr> elements, an additional call to
    removeUnprocessableHtmlTag() is required in each test’s set-up;
  • An additional separate test confirms removeUnprocessableHtmlTag('wbr')
    behaves as expected.

Added support to `Emogrifier` for HTML5 self-closing tags not recognized as such
by PHP’s `DOMDocument` implementation.

This is a port of the equivalent changes made for `AbstractHtmlProcessor`
in #651, with some differences in the tests:
- The tests employ `emogrify` and `emogrifyBodyContent` rather than `render` and
  `renderBodyContent`, as the latter are not public methods;
- Since, by default, `emogrify` removes `<wbr>` elements, an additional call to
  `removeUnprocessableHtmlTag()` is required in each test’s set-up;
- An additional separate test confirms `removeUnprocessableHtmlTag('wbr')`
  behaves as expected.
@JakeQZ JakeQZ added this to the 2.2.0 milestone Mar 14, 2019
@JakeQZ JakeQZ self-assigned this Mar 14, 2019
@oliverklee oliverklee merged commit 87d01e5 into master Mar 22, 2019
@oliverklee oliverklee deleted the bugfix/self-closing-tags/Emogrifier branch March 22, 2019 14:22
@JakeQZ JakeQZ mentioned this pull request Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants