featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 29 forks source link

use HTML5DOMDocument instead DOMDocument #138

Closed lexfrolenko closed 4 years ago

lexfrolenko commented 5 years ago

Description of the problem : Before processing by DOMDocument :

<picture>
    <source srcset="img.webp 100vw" type="image/webp">
    <img src="img.jpg" alt="">
</picture>

After processing by DOMDocument :

<picture>
    <source srcset="img.webp 100vw" type="image/webp">
          <img src="img.jpg" alt="">
    </source>
</picture>

<source> should not have a closing tag, this can cause problems for html validation. Class HTML5DOMDocument no have this problem.

And other small fixes :

  1. Added l10n_source to tx_dpnglossary_domain_model_term table;
  2. Show all terms if no characters is defined;
featdd commented 5 years ago

Hi @lexfrolenko,

thank you for your pull request.

Would you be so kind and seperate the small bugfixes from the Dom document? (So I can merge them seperatly)

Is the HTML5DOMDocument library a drop in replacement for PHP DOM? I don't like creating dependencies for small workarounds rather than add a couple of lines solving this without...

Give me a bit time or If you have a solution without adjust this request, if it is not so trivial to solve as I think we still can merge this ok?

Greetings Daniel

featdd commented 5 years ago

Hi @lexfrolenko,

I think I found a simple solution, could you be so kind to test if it solves the issue? See: d62da641150c1e29945b4970d25a9c8102f7c013

It's still just a workaround, the original issue persists in the PHP DOM implementation, but as mentioned above I like to avoid external dependencies as much as possible. But I will watch out for other HTML5 issues and keep your proposal in mind, thanks for that anyway.

Greetings Daniel

featdd commented 5 years ago

PS: Added the missing translation source field in a53a81b3debad1778eb10996ed27f3913b519f64