fix: < & > are parsed with HTML escape symbols (#481)

Adds utils.htmlDecode arround innerHTML to read the code for <py-repl> and
<py-script>, which preserves all newlines, tabs, and < & > characters.

Fix bug #480
This commit is contained in:
andre-dietrich
2022-06-09 23:01:31 +02:00
committed by GitHub
parent 03fee56a54
commit e1622a56fa
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ export class PyScript extends BaseEvalElement {
connectedCallback() {
this.checkId();
this.code = this.innerHTML;
this.code = htmlDecode(this.innerHTML);
this.innerHTML = '';
const mainDiv = document.createElement('div');