fix(cockpit): 修复驾驶舱页裸JSON显示——.ui内嵌Html widget的<script>字面量被浏览器HTML解析器提前闭合外层script致widget JSON外泄为可见文本;转义为\u003c(运行时DOM设置不受影响)
This commit is contained in:
parent
e485d2d30d
commit
dc4a3383f9
File diff suppressed because one or more lines are too long
@ -69,7 +69,7 @@
|
||||
{
|
||||
"widgettype": "Html",
|
||||
"options": {
|
||||
"html": "<script>setTimeout(function(){console.log('DIAG: page loaded, checking bricks');var ai=bricks.getWidgetById('chat_input',bricks.app);console.log('DIAG: chat_input widget:',ai?'found':'NOT FOUND','type:',ai?ai.constructor.name:'N/A','url:',ai?ai.opts.url:'N/A');if(ai&&ai.inputw){console.log('DIAG: inputw found, bind check');ai.inputw.unbind('inputed');ai.inputw.bind('inputed',function(e){console.log('DIAG: inputed RAW event:',JSON.stringify(e.params));});}fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){if(d.project_id){var sel=bricks.getWidgetById('project_selector',bricks.app);if(sel)sel.setValue(d.project_id);}})},200);</script>",
|
||||
"html": "\u003cscript>setTimeout(function(){console.log('DIAG: page loaded, checking bricks');var ai=bricks.getWidgetById('chat_input',bricks.app);console.log('DIAG: chat_input widget:',ai?'found':'NOT FOUND','type:',ai?ai.constructor.name:'N/A','url:',ai?ai.opts.url:'N/A');if(ai&&ai.inputw){console.log('DIAG: inputw found, bind check');ai.inputw.unbind('inputed');ai.inputw.bind('inputed',function(e){console.log('DIAG: inputed RAW event:',JSON.stringify(e.params));});}fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){if(d.project_id){var sel=bricks.getWidgetById('project_selector',bricks.app);if(sel)sel.setValue(d.project_id);}})},200);\u003c/script>",
|
||||
"height": "0",
|
||||
"width": "0"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user