mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
decode innerhtml for pyconfig (#926)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import toml from '../src/toml';
|
||||
import { getLogger } from './logger';
|
||||
import { version } from './runtime';
|
||||
import { getAttribute, readTextFromPath } from './utils';
|
||||
import { getAttribute, readTextFromPath, htmlDecode } from './utils';
|
||||
import { UserError } from "./exceptions"
|
||||
|
||||
const logger = getLogger('py-config');
|
||||
@@ -96,7 +96,7 @@ function extractFromSrc(el: Element, configType: string) {
|
||||
function extractFromInline(el: Element, configType: string) {
|
||||
if (el.innerHTML !== '') {
|
||||
logger.info('loading <py-config> content');
|
||||
return validateConfig(el.innerHTML, configType);
|
||||
return validateConfig(htmlDecode(el.innerHTML), configType);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user