You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a <script>-Tag via Customization (e.g. to conditionally load scripts depending on target-environment) the material/privacy plugin can produce invalid HTML-Code.
This seems to always happen if the <script>-Tag uses attributes without values (e.g. "defer" or "async") and if those attributes are placed before the "src"-attribute. In this case the plugin adds an equals-character to that attribute, but does not set a value, resulting in the browser to assume that "src= ...." is the value for the "defer"-attribute.
Thanks for reporting! Now this is funny – I thought we fixed this, but it's actually of the category "how did this ever work", as we're missing a = in the replacement (see fix in cc1508f). The problem stems from our use of a HTML4 parser, which is bundled with Python, and doesn't mandate us to install lxml, which is a dependency with native extensions. For this to work, we must jump through some hoops, including this monkey patch for boolean attributes.
Context
No response
Bug description
When adding a
<script>
-Tag via Customization (e.g. to conditionally load scripts depending on target-environment) the material/privacy plugin can produce invalid HTML-Code.Example:
This generates the following line in the output HTML-file:
This seems to always happen if the
<script>
-Tag uses attributes without values (e.g. "defer" or "async") and if those attributes are placed before the "src"-attribute. In this case the plugin adds an equals-character to that attribute, but does not set a value, resulting in the browser to assume that "src= ...." is the value for the "defer"-attribute.Related links
Reproduction
9.5.41-privacy-broken-html.zip
Steps to reproduce
See attached zip-archive...
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: