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
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->
Current behavior
In the presence of an opening textarea tag, without a closing textarea tag, some code is injected into the text area by this extension. Here's the code injected into the text area:
<body><!-- Code injected by live-server -->
<script>
// <![CDATA[ <-- For SVG support
if ('WebSocket' in window) {
(function () {
function refreshCSS() {
var sheets = [].slice.call(document.getElementsByTagName("link"));
var head = document.getElementsByTagName("head")[0];
for (var i = 0; i < sheets.length; ++i) {
var elem = sheets[i];
var parent = elem.parentElement || head;
parent.removeChild(elem);
var rel = elem.rel;
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
}
parent.appendChild(elem);
}
}
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
var address = protocol + window.location.host + window.location.pathname + '/ws';
var socket = new WebSocket(address);
socket.onmessage = function (msg) {
if (msg.data == 'reload') window.location.reload();
else if (msg.data == 'refreshcss') refreshCSS();
};
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
console.log('Live reload enabled.');
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
}
})();
}
else {
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
}
// ]]>
</script>
</body>
</html>
Here is a snippet of the HTML code that caused this error:
If the closing textarea tag is added, then, upon reload, the code is no longer present.
Expected behavior
An empty textarea should be created, instead of one with code in it.
Environment
Browser:
- [x] Chrome (desktop) version 131.0.6778.205
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [x] Edge version 131.0.2903.112
For Tooling issues:
- Live Server: <!-- Check which version is installed --> 5.7.9
- Platform: <!-- Mac, Linux, Windows --> Windows 11
- Visual Studio Code: <!-- `code --version` -->
1.96.2
fabdb6a30b49f79a7aba0f2ad9df9b399473380f
x64
Others
I came across this bug while working on pure HTML. No CSS, no JavaScript.
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
In the presence of an opening textarea tag, without a closing textarea tag, some code is injected into the text area by this extension. Here's the code injected into the text area:
Here is a snippet of the HTML code that caused this error:
If the closing textarea tag is added, then, upon reload, the code is no longer present.
Expected behavior
An empty textarea should be created, instead of one with code in it.
Environment
Others
I came across this bug while working on pure HTML. No CSS, no JavaScript.
The text was updated successfully, but these errors were encountered: