Closed kicktipp closed 7 years ago
Hi @kicktipp, I'm not clear as to what use case this is addressing. Your patch prohibits including Thymeleaf fragments on a <head>
element, which actually works right now, e.g.
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="fragments::hello">
<title>My Page</title>
</head>
</html>
What jQuery load()
filters out are elements such as <html>
, <head>
and <body>
from the fragment when including. So the following fragment would be ignored:
<html xmlns:th="http://www.thymeleaf.org">
<body th:fragment="hello">
<p>Hello</p>
</body>
</html>
Going to close this for now. Feel free to reopen with more info.
Because many browsers does not allow jquery.load() to change the head tag the script should not process it and log an error message
From http://api.jquery.com/load/
Patch: