mirror of
https://github.com/THU-MAIC/OpenMAIC.git
synced 2026-10-02 09:24:43 +08:00
* feat(playback): reference static GenUI components * feat(playback): gate courseware references * fix(pi): bound Interactive source HTML before parsing * fix(pi): bound interactive reference HTML processing * fix(playback): close interactive reference review gaps --------- Co-authored-by: wyuc <wang-yc24@mails.tsinghua.edu.cn>
27 lines
594 B
TypeScript
27 lines
594 B
TypeScript
/** Tags that cannot be selected as static Interactive courseware evidence. */
|
|
export const INTERACTIVE_REFERENCE_EXCLUDED_TAG_NAMES = [
|
|
'html',
|
|
'head',
|
|
'body',
|
|
'script',
|
|
'style',
|
|
'link',
|
|
'meta',
|
|
'noscript',
|
|
'template',
|
|
'iframe',
|
|
'canvas',
|
|
'noembed',
|
|
'noframes',
|
|
'plaintext',
|
|
'xmp',
|
|
] as const;
|
|
|
|
const INTERACTIVE_REFERENCE_EXCLUDED_TAG_SET = new Set<string>(
|
|
INTERACTIVE_REFERENCE_EXCLUDED_TAG_NAMES,
|
|
);
|
|
|
|
export function isInteractiveReferenceExcludedTag(tagName: string): boolean {
|
|
return INTERACTIVE_REFERENCE_EXCLUDED_TAG_SET.has(tagName.toLowerCase());
|
|
}
|