mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user