'spring boot with xml response comes with a script tag
When using Spring Boot with xml response, I am getting a script tag in the response as shown below:
<Set>
<script>(function () { if (window._psiOriginalAddEvent) { return; } let _disposed = false; window._psiOriginalAddEvent = window.addEventListener; window.addEventListener = (type, listener, options) => { if (type === "beforeunload") { window._psiOriginalAddEvent( "beforeunload", function (evt) { if (_disposed) { return; } listener.apply(this, arguments); }, true ); } else { window._psiOriginalAddEvent.call(null, type, listener, options); } }; window.addEventListener( "message", function (e) { if (e.data !== "psi-dispose-content") { return; } _disposed = true; window.onbeforeunload = null; }, true ); })();</script>
<item>
<orderId>27</orderId>
<name>Charlette</name>
<email>[email protected]</email>
<price>14423.83</price>
<lineItems>
<lineItems>
<id>30</id>
<qty>4</qty>
<name>Enormous Plastic Pants</name>
<price>1403.14</price>
</lineItems>
<lineItems>
<id>28</id>
<qty>3</qty>
<name>Ergonomic Wooden Plate</name>
<price>985.53</price>
</lineItems>
<lineItems>
<id>31</id>
<qty>3</qty>
<name>Fantastic Wool Plate</name>
<price>486.59</price>
</lineItems>
<lineItems>
<id>29</id>
<qty>3</qty>
<name>Fantastic Wool Plate</name>
<price>486.59</price>
</lineItems>
</lineItems>
</item>
Why am I getting the script tag in the response.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
