elementor / static-html-output

Static HTML Output Plugin for WordPress
https://statichtmloutput.com
The Unlicense
125 stars 35 forks source link

Remove WP <link> tags? creates invalid HTML #32

Closed mattdawson closed 4 years ago

mattdawson commented 5 years ago

When this is enabled this html:

<div class="textwidget"><p><a href="https://www.linkedin.com/company/182711/" target="_blank" rel="noopener"><img class="alignleft" src="https://wp.company.net/wp-content/uploads/2017/10/LinkedIn-Logo-02-e1507056485651.png" alt="Company LinkedIn" width="35" height="35" pagespeed_url_hash="1279215143" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></a></p>
</div>

becomes:

<div class="textwidget"><p></p><div><a href="”https://www.linkedin.com/company/182711/”"><img scr="" “<a="" href="https://www.linkedin.com/company/182711/" target="_blank" rel="noopener"><img class="alignright" src="https://www.company.net/wp-content/uploads/2017/10/LinkedIn-Logo-02-e1507056485651.png" alt="Company LinkedIn" width="35" height="35"></a>” alt=”LinkedIn” width=”35″ height=”35″/&gt;</div><p></p>
</div>

Note the paragraphs have changed, double quoting and half a tag at the end for the alt="LinkedIn"

Is it because my dynamic site domain starts with "wp." ?

leonstafford commented 5 years ago

Hi @mattdawson, sorry for the slow reply here.

Version 7 is bringing more control over which elements if any you remove. I'll try to reproduce this issue with the same code sample and fashion a fix

leonstafford commented 4 years ago

Linked commit https://github.com/WP2Static/static-html-output-plugin/commit/662227ecebd2b9ad90af461009186bd42418f339 includes test case proving this is no longer affecting output